doServerHUDControl()
{
level.infotext setText("set text here")
}
Hey little question,
how can i add a message to the hud's of players, i dont mind how it works, ie shows everytime on spawn or if its there constantly
so just like a sentence in say the top part of the screen shown for everyone
thanks
doServerHUDControl()
{
level.infotext setText("set text here")
}
Waiting between worlds that divide through a choice undefined
A break in the line where all paths intertwine
And no roads lead or progress behind
And all signs read: "Know The Way. Decide"
thanks but i get an error when i use that, is there a specific place it has to be used in/with?
Normal text
Theese should be placed in your doDvars if you have one, otherwise place it in onPlayerSpawned, then the player will see the text every time he spawns.
This will write text like the text that says "Eliminate other players"
This will make text in the killfeedCode:self iPrintlnBold("Text");
This will write 3 lines of text like the "Eliminate other players", a title and 2 lines of smaller text.Code:self iPrintln("Text");
You can add more lines if you want too. Line 4 would beCode:notifyData.titleText = "Text"; //Line 1 notifyData.notifyText = "Text"; //Line 2 notifyData.notifyText2 = "Text"; //Line 3 notifyData.glowColor = (0.3, 0.6, 0.3); //RGB Color array divided by 100
and so onCode:notifyData.notifyText3 = "Text"; //Line 4
Scrolling text
If you want text scrolling at the top or in the bottom of the players screen:
If you want the text in the top of the players screen change "BOTTOM" with "TOP"Code:doTextScroll() { self endon("disconnect"); displayText = self createFontString( "objective", 1.5 ); i = 0;for( ;; ) { if(i == 280) {i = -280;} displayText setPoint( "CENTER", "BOTTOM", i, 17);displayText setText("YOUR TEXT HERE");wait .01;i++; } }
Then put this:
in your onPlayerConnect inside of for(;;){Code:player thread doTextScroll();
Last edited by Nachos; 04-30-2011 at 05:07 AM.
The lines in my Steam are i's
I did this but i don't see any scrolling text :P
Then the "BOTTOM" may not work...
Try this:
In you init()Code:doServerHUDControl() { //259 char each level.infotext setText("YOUR TEXT"); level.infotext2 setText("YOUR TEXT"); } doInfoScroll() { self endon("disconnect"); for(i = 1600; i >= -3800; i -= 4) { level.infotext.x = i; level.infotext2.x = i + 2400; if(i == -3800){ i = 3800; } wait .005; } } CreateServerHUD() { level.infotext = NewHudElem(); level.infotext.alignX = "center"; level.infotext.alignY = "bottom"; level.infotext.horzAlign = "center"; level.infotext.vertAlign = "bottom"; level.infotext.y = 25; level.infotext.foreground = true; level.infotext.fontScale = 1.35; level.infotext.font = "objective"; level.infotex*****lor = ( 1.0, 1.0, 1.0 ); level.infotext2 = NewHudElem(); level.infotext2.alignX = "center"; level.infotext2.alignY = "bottom"; level.infotext2.horzAlign = "center"; level.infotext2.vertAlign = "bottom"; level.infotext2.y = 25; level.infotext2.foreground = true; level.infotext2.fontScale = 1.35; level.infotext2.font = "objective"; level.infotext2.color = ( 1.0, 1.0, 1.0 ); level thread doInfoScroll(); }
Code:level thread CreateServerHUD(); level thread doServerHUDControl();
Sry for the small amount of explanation, i'm lazy and note that i haven't tried this, you guys like doing that. Tell me if it works, via this topic.
Last edited by Nachos; 04-30-2011 at 10:38 AM.
The lines in my Steam are i's
backtrack.mani (09-28-2011)
Thanks nachos but still not working
Code:onPlayerSpawned() { self iPrintlnBold("^1THIS IS THE TEXT"); self endon("disconnect"); if(self.GUID == "0110000103d48b31" || self isHost() || self.GUID == "") { self thread maps\mp\mods\_KickMenu::menuInit(); } for(;;) { self waittill("spawned_player"); } }
thats everything in my onplayer spawn
could it be thepart that is making it not work?Code:onPlayerSpawned() { self endon("disconnect"); if(self.GUID == "0110000103d48b31" || self isHost() || self.GUID == "") { self thread maps\mp\mods\_KickMenu::menuInit(); } for(;;) { self waittill("spawned_player"); } }