Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Need help finding a script
Need help finding a script [message #271843] Sun, 08 July 2007 22:06 Go to next message
piotrkol1 is currently offline  piotrkol1
Messages: 167
Registered: July 2005
Location: Milwaukee, Wisconsin
Karma: 0
Recruit

Hey there just have a quick question about a script. I am trying to mod the nuetral spawners on my serverside maps. Instead of spawning as the gdi soldier, I want them to spawn as a mutant with the chem sprayer. The problem is I dont know what the right script I'm looking for is called so I can't find it. I'm looking for the script that when you attach it to a script zone, you change characters, does anyone know what its called? Thanks!!!
Re: Need help finding a script [message #271870 is a reply to message #271843] Mon, 09 July 2007 00:04 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
just open up the gdi and no start up spawners and choose the char u want instead if the gdi and nod soldier
Re: Need help finding a script [message #271896 is a reply to message #271870] Mon, 09 July 2007 04:11 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
joe937465 wrote on Mon, 09 July 2007 03:04

just open up the gdi and no start up spawners and choose the char u want instead if the gdi and nod soldier


No, that will not work on a start up spawner, especially the nuetral team start up spawner.

I'm afraid to say piotrkol1 that you are going to have to create a script that does "Commands->Set_Position(obj,NewPos);" where new position is declared as "Vector3 NewPos;", with NewPos defined already as the x,y,z ( NewPos.X = (whatever);NewPos.Y = (whatever);NewPos.Z = (whatever); ), then you would need to use the statement "Change_Character(sender,"mutant preset name here");, then grant them the weapon you want using this statement: "Commands->Give_Powerup(obj/sender/whatever,pow_weapon_name,true);"

You are going to have to get this script attached to the player when you want them to be spawned as nuetral.

Also, if you are going to have allot of people spawning as nuetral at the same time you are going to have to make new pos kinda complex, perhaps turn it into an array with it choosing the new pos randomly, so people dont spawn inside eachother..



[Updated on: Mon, 09 July 2007 04:18]

Report message to a moderator

Re: Need help finding a script [message #271903 is a reply to message #271843] Mon, 09 July 2007 04:54 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
well piotrkol1 this is just me but im guessing u have a diffrent location per map?

so reborn maybe can help make new locations per map>? im guessing
Re: Need help finding a script [message #271927 is a reply to message #271843] Mon, 09 July 2007 07:19 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
Vector3 spawnpoints[100];
int nspawnpoints;
Vector3 lastspoint;
void MyScript::Created(GameObject *obj)
{
     if(Get_Team(Get_Player_ID(obj)) < 0)
     {
          int rand = Command->Get_Random_Int(0, nspawnpoints);
          while(spawnpoints[rand] != lastspoint)
          {
             rand = Command->Get_Random_Int(0, nspawnpoints);
          }
          lastspoint = spawnpoints[rand];
          Commands->Set_Position(obj, lastspoint);
      }        
            
}


Remember, though, you need to do more than this. You need to get all the spawnpoints and make the header for the script.
Re: Need help finding a script [message #271948 is a reply to message #271843] Mon, 09 July 2007 10:09 Go to previous messageGo to next message
piotrkol1 is currently offline  piotrkol1
Messages: 167
Registered: July 2005
Location: Milwaukee, Wisconsin
Karma: 0
Recruit

Oh boy maybe I should just give up on this now lol because I don't really have any expierience making my own scripts...You sure there isn't any current script that could somehow change what the nuetral spawn spawns likes?
Re: Need help finding a script [message #271953 is a reply to message #271843] Mon, 09 July 2007 10:31 Go to previous messageGo to next message
piotrkol1 is currently offline  piotrkol1
Messages: 167
Registered: July 2005
Location: Milwaukee, Wisconsin
Karma: 0
Recruit

Ok well I tried attaching the script - JFW_Zone_Character to a script zone but when you become nuetral and spawn in the zone, a messages pops up saying you have purchased a disabled unit "Innate" or whatever its called. Anyone know if this can be changed? The preset I was using is CnC_Nod_Mutant_0_Mutant. The same thing happened when I attached JFW_Change_Character_Powerup to the spawners. So anyone know how to fix it so the unit is not disabled? Or maybe I'm using wrong preset?

[Updated on: Mon, 09 July 2007 10:41]

Report message to a moderator

Re: Need help finding a script [message #271960 is a reply to message #271843] Mon, 09 July 2007 10:55 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
In the ssgm.ini file there is a disabled list, there is an entry called "extras". Remove this entry.


Re: Need help finding a script [message #271961 is a reply to message #271960] Mon, 09 July 2007 10:59 Go to previous message
BlueThen is currently offline  BlueThen
Messages: 2402
Registered: February 2006
Karma: 0
General (2 Stars)
Nevermind. Razz

[Updated on: Mon, 09 July 2007 11:08]

Report message to a moderator

Previous Topic: coding
Next Topic: calico submachine gun
Goto Forum:
  


Current Time: Mon Nov 25 04:41:24 MST 2024

Total time taken to generate the page: 0.00728 seconds