Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Timer_Expired
Re: Timer_Expired [message #371572 is a reply to message #371565] Wed, 11 February 2009 07:32 Go to previous messageGo to previous message
Jerad2142 is currently offline  Jerad2142
Messages: 3813
Registered: July 2006
Location: USA
Karma:
General (3 Stars)
void MyScript::Enter(GameObject *o, GameObject *e)
{
   Commands->Start_Timer(o, this, 123.123, 10);
   playerid = Get_ID(enter)
}

void MyScript::Timer_Expired(GameObject *obj, GameObject *enter, int number)
{
   if(number == Get_Int_Parameter("TimerNumber"))
   {
         GameObject *enterer = Commands->Find_Object(playerid);
         //rest of code
   }
}


void MyScript::Register_Auto_Save_Variables()
{
	Auto_Save_Variable(1,5,&playerid);
}

You'll have to investigate into arrays if you want the zone to ever be able to handle more then one person, because if thats a 60 second timer, the last id will be overridden before it is put to use if someone hops in.


[Updated on: Wed, 11 February 2009 07:32]

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
Previous Topic: Link To This Skin?
Next Topic: Script for aircrafts needed...
Goto Forum:
  


Current Time: Mon Dec 23 22:30:05 MST 2024

Total time taken to generate the page: 0.00824 seconds