Home » Renegade Discussions » Mod Forum » Few questions
Re: Few questions [message #409568 is a reply to message #409530] |
Fri, 06 November 2009 09:11 |
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
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
|
|
|
|
|
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:37:45 MST 2024
Total time taken to generate the page: 0.00897 seconds
|