So I am trying to create a script similar to cs:go, where it displays the name of the area you are in in the top left of the screen. Well, I got this written down
When I enter the 2nd area, the text for the 2nd area pops up but it overlaps the 1st area text, I want the 1st area text to disappear and just display the 2nd area text.
I thought just doing destroy(); would work but it doesn't, also tried using notify and endon and it still didnt fix it.
Well I see a couple things that you could change. For instance I noticed that your hud variable is a level variable which would mess up on coop since it would be the same variable for all players. Its best to set it as a variable on the player instead. Secondly, I believe it would be better to only create the hud once and then just change the text each time you enter a new zone.
while(1) { wait(0.5); // also this really isn't needed if you have a waittill (just saying :P) tspawn_area waittill("trigger",player); player thread tspawn_area_hud("Tspawn Area"); } }
Well I see a couple things that you could change. For instance I noticed that your hud variable is a level variable which would mess up on coop since it would be the same variable for all players. Its best to set it as a variable on the player instead. Secondly, I believe it would be better to only create the hud once and then just change the text each time you enter a new zone.
while(1) { wait(0.5); // also this really isn't needed if you have a waittill (just saying :P) tspawn_area waittill("trigger",player); player thread tspawn_area_hud("Tspawn Area"); } }
I do this same thing in Orbit, but I don't display the zone, I use it for other reasons. I would prob use menu to display it myself, but to each his own.
I have two triggers at each door, trigger_multiples. I set a player attribute whenever they are triggered to the script_noteworthy of the trigger:
CurrentZone(){ while(1){ self waittill("trigger",player); if(player.currentZone != self.script_noteworthy){ player.currentZone = self.script_noteworthy;//not needed if you set text for hud in next line //could setText for your hud here //player SetClientDvar("currentzone",self.script_noteworthy);//used for menu instead } } } //hud stuff if you use that
Last Edit: September 06, 2015, 03:45:58 am by MakeCents
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time