Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Few questions
Re: Few questions [message #409568 is a reply to message #409530] Fri, 06 November 2009 09:11 Go to previous messageGo to previous message
Hubba is currently offline  Hubba
Messages: 40
Registered: October 2009
Karma:
Recruit
reborn wrote on Thu, 05 November 2009 23:54

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.


Hmm "GTH_Credit_Trickle" doesn't seem to work like that Huh
I think you can only attach it to players. Which would mean that i would have to attach the script when they join and reattach it to them when they die. And then it would probably be not in sync with the other credit_tickle which would mean that you would get +6 one second and then -4 the other second.

[Updated on: Fri, 06 November 2009 09:14]

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


Current Time: Sun Dec 15 08:37:45 MST 2024

Total time taken to generate the page: 0.00897 seconds