It's there a Grant Power Up script? [message #467945] |
Fri, 25 May 2012 05:31 ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/avatars/Sedan.jpg) |
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
![Distrbd21](/theme/Renegade_Forums/images/yahoo.png)
|
|
Here's what I got so far.
class Distrbd21ChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
if(strcmp(Get_Player_Name_By_ID(ID), "Distrbd21")) return;
GameObject *obj = Get_GameObj(ID);
int cost = 0;
if (Commands->Get_Money(obj) > cost)
{
Change_Character(obj, "CnC_GDI_MiniGunner_3Boss_ALT3");
Set_Max_Shield_Strength(obj, (Commands->Get_Max_Shield_Strength(obj) + 500));
Set_Max_Health(obj, (Commands->Get_Max_Health(obj) + 500));
Attach_Script_Once(Get_GameObj(ID), "M00_No_Falling_Damage_DME", "");
Attach_Script_Once(Get_GameObj(ID), "RA_Infantry_Spy", "");
Attach_Script_Once(Get_GameObj(ID), "JFW_Blow_Up_On_Death", "Explosion_IonCannonBeacon");
Attach_Script_Once(Get_GameObj(ID), "JFW_Poke_Play_3D_Sound", "Paging_caution_2.wav");
Commands->Set_Shield_Type(obj,"SkinMutant");
}
}
};
ChatCommandRegistrant<Distrbd21ChatCommand> Distrbd21ChatCommandReg("!dis",CHATTYPE_ALL,0,GAMEMODE_ALL);
Note I have tried to put
Commands->Give_Powerup(obj, "Weap Name here." 1);
But it doesn't give me the Weapons I tell it to.
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
[Updated on: Fri, 25 May 2012 05:34] Report message to a moderator
|
|
|
|
Re: It's there a Grant Power Up script? [message #467950 is a reply to message #467949] |
Fri, 25 May 2012 05:47 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/avatars/Sedan.jpg) |
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
![Distrbd21](/theme/Renegade_Forums/images/yahoo.png)
|
|
iRANian wrote on Fri, 25 May 2012 07:43 | You need to supply a Powerup preset name instead of a weapon name.
|
Yes that is what I meant I did that, but sense I technically re spawn when changed to havoc it give's my weapons to my old char not the new one ;p
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|
|
Re: It's there a Grant Power Up script? [message #467953 is a reply to message #467945] |
Fri, 25 May 2012 05:58 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/avatars/Sedan.jpg) |
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
![Distrbd21](/theme/Renegade_Forums/images/yahoo.png)
|
|
Haven't tried that, how would I change it like that?
I'm a n00b that is one of the codes I started working on, had help with it to lol.
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|
|
Re: It's there a Grant Power Up script? [message #467956 is a reply to message #467945] |
Fri, 25 May 2012 06:17 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/avatars/Sedan.jpg) |
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
![Distrbd21](/theme/Renegade_Forums/images/yahoo.png)
|
|
Oh that's to give me the tib shield so when I walk in tib field I Regen ;p
Can I put havoc's preset there?
I'm also having problems with.
Attach_Script_Once(Get_GameObj(ID), "JFW_Poke_Play_3D_Sound", "Paging_caution_2.wav");
When someone pokes me no sound, and I tried the 2D script to.
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
[Updated on: Fri, 25 May 2012 06:18] Report message to a moderator
|
|
|
|
|
Re: It's there a Grant Power Up script? [message #467990 is a reply to message #467945] |
Fri, 25 May 2012 18:25 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/avatars/Sedan.jpg) |
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
![Distrbd21](/theme/Renegade_Forums/images/yahoo.png)
|
|
I need it so when you poke me you hear the sound. ;p
And I'm getting a error on that script saying something about vector 3.
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|
|
Re: It's there a Grant Power Up script? [message #467994 is a reply to message #467991] |
Fri, 25 May 2012 19:01 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/avatars/Sedan.jpg) |
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
![Distrbd21](/theme/Renegade_Forums/images/yahoo.png)
|
|
Xpert wrote on Fri, 25 May 2012 20:27 | vector3 means xyz coordinates
|
I know that and I don't need that right now.
I don't want it to play a sound when we get it I want it to play a sound when someone comes up to me and press's e on me.
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|
|
Re: It's there a Grant Power Up script? [message #467997 is a reply to message #467945] |
Fri, 25 May 2012 23:40 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/avatars/Sedan.jpg) |
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
![Distrbd21](/theme/Renegade_Forums/images/yahoo.png)
|
|
OK so what do I need for the 2D sound?
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|
Re: It's there a Grant Power Up script? [message #468000 is a reply to message #467945] |
Sat, 26 May 2012 00:12 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/27.png) |
Whitedragon
Messages: 832 Registered: February 2003 Location: California
Karma: 1
|
Colonel |
|
|
JFW_Poke_Play_2D_Sound_Player is kind of what you want, though it takes a sound preset and not a sound file. If you want to play a sound file you'll need to make a new script to do it.
Black-Cell.net
Network Administrator (2003 - )
DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )
Dragonade, Renegade's first server side modification
Lead coder (2005 - )
|
|
|
Re: It's there a Grant Power Up script? [message #468002 is a reply to message #467945] |
Sat, 26 May 2012 00:44 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/avatars/Sedan.jpg) |
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
![Distrbd21](/theme/Renegade_Forums/images/yahoo.png)
|
|
That wont work, it give's an error saying attach script can't have 4 arguments....
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
[Updated on: Sat, 26 May 2012 01:02] Report message to a moderator
|
|
|
Re: It's there a Grant Power Up script? [message #468006 is a reply to message #467945] |
Sat, 26 May 2012 02:54 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
iRANian
Messages: 4307 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
You need to attach the arguments to a script to the last argument of Attach_Script_Once() and related functions, if a script has more than one arguments you need to do something like:
Attach_Script_Once(obj, "script_name", "1024,derp,4.5");
where 1024 is an int, derp is a string and 4.5 is a float. In most cases you want to supply a "params" char buffer that contains the arguments formatted with a sprintf before hand, like so:
char params[256];
sprintf(params,"%d,%s,%s,%s,%s,%s",param,Get_Parameter("Underwater_Effect_Controller"),Get_Parameter("Surface_Water_Effect"),Get_Parameter("Underwater_Effect"),Get_Parameter("Surface_Swim_Sound"),Get_Parameter("Underwater_Swim_Sound"));
Attach_Script_Once(sender,"JMG_Swimming_Water_Effects_Script",params);
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
[Updated on: Sat, 26 May 2012 02:55] Report message to a moderator
|
|
|
Re: It's there a Grant Power Up script? [message #468024 is a reply to message #467945] |
Sat, 26 May 2012 09:59 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) |
![](http://renegadeforums.com/images/avatars/Sedan.jpg) |
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
![Distrbd21](/theme/Renegade_Forums/images/yahoo.png)
|
|
That makes a lot of sense thank you for explaining it to a n00b ;p
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|