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 #408565 is a reply to message #408560] Tue, 27 October 2009 13:10 Go to previous messageGo to previous message
Hubba is currently offline  Hubba
Messages: 40
Registered: October 2009
Karma:
Recruit
reborn wrote on Tue, 27 October 2009 13:29

It absolutely will attach to an invis object. Did you remember the scripts registrant?

//edit

I see what you're doing wrong.. It's "Invisible_Object", not "Invis_Object".



That did the trick.

Okey i got it work. But i want you to take a look:

Join_hook
if(Get_GameObj(i)){
Attach_Script_Once(Get_GameObj(i),"Test_hubba","");
}
else {
Vector3 pos;
pos.X = 0.0f;
pos.Y = 0.0f;
pos.Z = 0.0f;
GameObject *invis = Commands->Create_Object("Invisible_Object", pos);
Attach_Script_Once(invis,"Test_hubba1","");



Test_hubba1
void Test_hubba1::Created(GameObject *obj){
Commands->Start_Timer(obj,this,1.0f,1);
}

void Test_hubba1::Timer_Expired(GameObject *obj,int ID)
{
if(Get_GameObj(ID)){
	for (int a = 0; a < 128; a++){
	if(IsPlayerStealth[a] == true){
	Commands->Enable_Stealth(Get_GameObj(a),true);
    }
}

}
else {
Attach_Script_Once(obj,"Test_hubba1","");
   }	
}


Test_hubba
void Test_hubba::Created(GameObject *obj){
	 Commands->Start_Timer(obj,this,5.0f,1);
}

void Test_hubba::Timer_Expired(GameObject *obj,int number)
{
 	if (number == 1){
for (int a = 0; a < 128; a++){
	if(IsPlayerStealth[a] == true){
	Commands->Enable_Stealth(Get_GameObj(a),true);
           }
      }
}
}




Now it depends on how fast you load. If i put in hubba_test1 the timer to for example 0.5 then it would be way to fast. But 1.0 works for me. But if we got a really slow player then it wouldnt work? Well i could put the timer to like 5.0 like i have in hubba_test then i would get most of the players.

Yes i dont really know if i coded anything right in hubba_test1 so if you could take a look it would be nice.

[Updated on: Tue, 27 October 2009 13:15]

Report message to a moderator

 
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 18:53:03 MST 2024

Total time taken to generate the page: 0.01306 seconds