Some scripting help needed with spawnpoints


(lennyballa) #1

I can’t figure out how to script this, but i tell you the situation:

Axis 1st spawn is called temple spawn and when they blow up a door, they will get a new spawn called village spawn. (The team_wolfobjectives have these target- and scriptnames) Then, i want the 1st allied spawn to be removed (Allied_spawn) and then they spawn at the villa spawn. Btw, the village spawn is at a diffrent place then the first allied spawn. Can someone help me out with this?


(damocles) #2

It’s pretty simple really:

When the door is blown, you want to kill the spawns that are no longer needed. You can either do this with the kill script command, or you can set up a target_kill in the game that will then target the entities you want to kill - then trigger the target_kill by the alertentity script command.

The thing to remember is to use the setautospawn <team> <description key of team_wolf_objective> command to move the standard spawn away from the area where you killed the spawn points and into the area you want them to spawn in. Same goes for Axis side, you set their auto spawn to the door area so they are advancing.


(lennyballa) #3

Well, how to script this? I really cant script. But i do know what you mean, can you post a example of how the script will look alike then? Thx in advance


(damocles) #4

Well, say your temple door explosive was called t_door…


t_door
{
death
   {
   setautospawn 1 "Allied Village Spawn"
   setautospawn 0 "Axis Temple Spawn"
   alertentity kill_allied_spawn
   }
}

Simple really :slight_smile:


(lennyballa) #5

ok i will test it, lets hope it works :slight_smile: Thx alot


(lennyballa) #6

Should the autospawn “key” be the same as my TWO? Or as my description. I get an error that says couldnt find target for autospawn.


(Mean Mr. Mustard) #7

setautospawn uses the ‘description’ key


(lennyballa) #8

ok thx, il try it that way


(lennyballa) #9

Well, it seems to work, but i still get a new error: Gscripting: couldnt’t find targetname: kill_allied village spawn (Or something similar to this) What have i done wrong now? (i feel soooo noob, sorry)


(Mean Mr. Mustard) #10

Can you post your script? It’ll be easier to help if we the entire script.

(no prob with the ‘n00b’ questions - they aren’t really!! seems like a lot of people ignore scripting until there map is ‘finished’ - I took the other approach - learned scripting first, then started my map)


(damocles) #11

Did you create a target_kill entity that is linked to the spawn points you want to remove? Is the targetname of this entity matched to the alertentity call in the script?


(Ifurita) #12

Agree with Mr Mustard. I blocked out the map in big pieces of caulk with a couple of detailed buildings, then started scripting objectives - to see what I could do, before wasting time making really detailed eye candy


(lennyballa) #13

Sorry, i’m at my uncles pc now, cant post the script. I just use another “tactic” to do: I just use for the spawns after the gate was destroyed, with the same type of script they use in Goldrush. It works fine this way, only the flag isnt to close to the spawns, but i dont really care, because it’s uncaptureable. Thanks alot guys :slight_smile: