Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Stealth command help
Re: Stealth command help [message #408328 is a reply to message #407893] Sun, 25 October 2009 15:54 Go to previous messageGo to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma:
General (3 Stars)
So you're saying that they need to actually have a GameObject themselves before you use the stealth command on someone else?

In that case you could still do it on player join, just make sure you do a conditional like:

if(Get_GameObj(ID)){
// The player that joined has a GameObject, so i'll do my little loop here now...
//my loop
}
else{
// That slow ass loading fucker doesn't have a GameOnbject yet
// So I will create an object myself here, and attach a script to it that has a timer on it.
//define and initialise the pos here
Vector3 pos;
pos.X = 0.0f;
pos.Y = 0.0f;
pos.Z = 0.0f;
//Code here to create a gameobject, something like GameObject *invis = Commands->Create_Object("InvisObject", pos);
//attach script to the object here
}

Your script should basically just have a created and timer_expired event that loops every 0.5 seconds or whatever, and each iteration of it should check to see if that player ID has a gameobject yet, if it does, then do the loop to -re-set the players to stealth, if not, then do the Command->start_timer to continue the loop again...



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: I need of a modified scripts.dll
Next Topic: Level Edit Problem
Goto Forum:
  


Current Time: Sat Dec 21 09:24:02 MST 2024

Total time taken to generate the page: 0.01414 seconds