Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Few questions
Re: Few questions [message #409530 is a reply to message #408816] Thu, 05 November 2009 22: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)
On the level loaded event, attach a script to the ref to grant the +4 money. Then attach another script at the same time to the PP (if it exists) that removes that script when it's destroyed, and adds just +1 instead.

void Level_Loaded() {
GameObject *GDIRef = Find_Refinery(1);
GameObject *NodRef = Find_Refinery(0);

GameObject *GDIPP = Find_Power_Plant(1);
GameObject *NodPP = Find_Power_Plant(0);

if(GDIREF){
Attach_Script_Once(GDIRef,"GTH_Credit_Trickle", "4,2.00");
}
if(NodRef){
Attach_Script_Once(NodRef,"GTH_Credit_Trickle", "4,2.00");
}

if(GDIPP){ //Not sure what what happen if you tried to attach it if it didn't exist
Attach_Script_Once(GDIPP,"hubba_pp_death", "");
}
if(NodPP){
Attach_Script_Once(NodPP,"hubba_pp_death", "");
}
//etc etc

}


hubba_pp_death should simply have a ::Killed event, and on that event it should find out it's own teams ref, remove the gth_credit script (if the ref still has any health), then re-attach a gth_credit but add +1 instead.


Pretty crude really, but it's 05:55 here and I'm sleepy.



 
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: CnC Reborn : Jumpjet Animation Test
Next Topic: PimPen Harvy
Goto Forum:
  


Current Time: Sun Dec 15 08:53:47 MST 2024

Total time taken to generate the page: 0.00949 seconds