Home » Renegade Discussions » Mod Forum » Few questions
Re: Few questions [message #409530 is a reply to message #408816] |
Thu, 05 November 2009 22:54 |
|
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.
|
|
|
|
|
Few questions
By: Hubba on Thu, 29 October 2009 22:10
|
|
|
Re: Few questions
|
|
|
Re: Few questions
By: reborn on Fri, 30 October 2009 03:29
|
|
|
Re: Few questions
By: Hubba on Fri, 30 October 2009 09:22
|
|
|
Re: Few questions
By: reborn on Fri, 30 October 2009 12:48
|
|
|
Re: Few questions
By: Hubba on Fri, 30 October 2009 14:30
|
|
|
Re: Few questions
By: reborn on Fri, 30 October 2009 14:58
|
|
|
Re: Few questions
By: Hubba on Sat, 31 October 2009 04:21
|
|
|
Re: Few questions
By: cAmpa on Sat, 31 October 2009 04:41
|
|
|
Re: Few questions
By: Hubba on Sat, 31 October 2009 05:56
|
|
|
Re: Few questions
By: cAmpa on Sat, 31 October 2009 06:43
|
|
|
Re: Few questions
By: Hubba on Sat, 31 October 2009 12:10
|
|
|
Re: Few questions
By: Hubba on Thu, 05 November 2009 21:45
|
|
|
Re: Few questions
By: reborn on Thu, 05 November 2009 22:54
|
|
|
Re: Few questions
By: Hubba on Fri, 06 November 2009 09:11
|
|
|
Re: Few questions
|
|
|
Re: Few questions
By: Hubba on Fri, 06 November 2009 13:46
|
|
|
Re: Few questions
By: reborn on Sat, 07 November 2009 01:00
|
|
|
Re: Few questions
By: Hubba on Sat, 07 November 2009 03:05
|
|
|
Re: Few questions
By: raven on Sat, 07 November 2009 13:47
|
Goto Forum:
Current Time: Sun Dec 15 08:53:47 MST 2024
Total time taken to generate the page: 0.00949 seconds
|