delivery spawn scripting


(Kynval) #1

hi.
i try to add spawnpoint in sp_delivery_te

its in …script file:

game_manager
{
	spawn
	{
	
		// #spawn 9
		create
		{
			scriptName "tunelallies_spawn9"
			classname "team_CTF_bluespawn"
			targetname "tunelallies_spawn"
			origin "478 -2674 -39"
			spawnflags 9 // TEAM_ALLIES
			angle "45"
		}

in first allies spawn
whats wrong?


(acQu) #2

You need something like this:

create
{
   scriptName "fueldumphq_obj"
   classname "team_WOLF_objective"
   targetname "fueldumphq_obj"
   origin "-10853 -2036 6"   // z = CC_FILTER_ALLIES(2) | CC_FILTER_SPAWNS(4)
   spawnflags 2   // TEAM_ALLIES(2)
}

create
{
   scriptName "fueldumphq_spawn1"
   classname "team_CTF_bluespawn"
   targetname "fueldumphq_spawn"
   origin "11072 -2448 512"
   spawnflags 2   // TEAM_ALLIES
}

create
{
   scriptName "fueldumphq_spawn2"
   classname "team_CTF_bluespawn"
   targetname "fueldumphq_spawn"
   origin "-10995 -2448 512"
   spawnflags 2   // TEAM_ALLIES
}

create
{
   scriptName "fueldumphq_spawn3"
   classname "team_CTF_bluespawn"
   targetname "fueldumphq_spawn"
   origin "-10918 -2448 512"
   spawnflags 2   // TEAM_ALLIES
}

create
{
   scriptName "fueldumphq_spawn4"
   classname "team_CTF_bluespawn"
   targetname "fueldumphq_spawn"
   origin "-10841 -2448 512"
   spawnflags 2   // TEAM_ALLIES
}

create
{
   scriptName "fueldumphq_spawn5"
   classname "team_CTF_bluespawn"
   targetname "fueldumphq_spawn"
   origin "11072 -2288 512"
   spawnflags 2   // TEAM_ALLIES
}

create
{
   scriptName "fueldumphq_spawn6"
   classname "team_CTF_bluespawn"
   targetname "fueldumphq_spawn"
   origin "-10995 -2288 512"
   spawnflags 2   // TEAM_ALLIES
}

create
{      
   scriptName "fueldumphq_spawn7"      
   classname "team_CTF_bluespawn"
   targetname "fueldumphq_spawn"
   origin "-10918 -2288 512"
   spawnflags 2   // TEAM_ALLIES
}

create
{
   scriptName "fueldumphq_spawn8"
   classname "team_CTF_bluespawn"
   targetname "fueldumphq_spawn"
   origin "-10841 -2288 512"
   spawnflags 2   // TEAM_ALLIES
}

Code taken from here:
http://wolfwiki.anime.net/index.php/Map_scripting#Example_2:_Fueldump_and_Spawning_at_the_Command_Post

You need to also set this spawn active/inactive at right places in script. I think the command was something like “alertentity <targetname>”, but not quite sure on that command.


(Kynval) #3

soo… tell me:

scriptName -> my name (not very important
classname “team_CTF_bluespawn” (axis or allies spawn - important)
targetname “fueldumphq_spawn” (whats that? what needs to add here?)
origin “-10918 -2288 512” (possision)
spawnflags 2 // TEAM_ALLIES (its tells about setspawnpt ?)


(Micha) #4

scriptName -> links to other script targets (important!)
classname “team_CTF_bluespawn” (axis or allies spawn - important)
targetname “fueldumphq_spawn” (doesn’t matter, just a name)
origin “-10918 -2288 512” (position)
spawnflags 3

example for cortex bottom spawn:

create
{
“scriptname” “bottomspawn”
“targetname” “bottomspawn”
“spawnflags” “3”
“angle” “90”
“origin” “-2150 305 -2200”
“classname” “team_CTF_redspawn”
}
create
{
“scriptname” “bottomspawn”
“targetname” “bottomspawn”
“spawnflags” “3”
“angle” “90”
“origin” “-2150 315 -2200”
“classname” “team_CTF_redspawn”
}
create
{
“scriptname” “bottomspawn”
“targetname” “bottomspawn”
“spawnflags” “3”
“angle” “90”
“origin” “-2130 315 -2200”
“classname” “team_CTF_redspawn”
}
create
{
“scriptname” “bottomspawn_wobj”
“targetname” “bottomspawn_wobj”
“description” “Bottom Spawn”
“classname” “team_WOLF_objective”
“origin” “-2630 -182 -2200”
“spawnflags” “3”
}

example for sw_oasis_b3

game_manager
{
spawn
{
create
{
targetname “bflag_wobj”
scriptname “bflag_wobj”
classname “team_WOLF_objective”
origin “6576 6675 -250”
description “Upper Way Spawn”
spawnflags “2”
}
create
{
scriptName “bflag_spawn1”
classname “team_CTF_bluespawn”
targetname “bflag_spawn”
origin “6663 6732 -250”
angle “180”
spawnflags “1”
}
create
{
scriptName “bflag_spawn2”
classname “team_CTF_bluespawn”
targetname “bflag_spawn”
origin “6663 6674 -250”
angle “180”
spawnflags “1”
}
create
{
scriptName “bflag_spawn3”
classname “team_CTF_bluespawn”
targetname “bflag_spawn”
origin “6663 6633 -250”
angle “180”
spawnflags “1”
}
create
{
scriptName “bflag_spawn4”
classname “team_CTF_bluespawn”
targetname “bflag_spawn”
origin “6663 6585 -250”
angle “180”
spawnflags “1”
}
create
{
scriptName “bflag_spawn5”
classname “team_CTF_bluespawn”
targetname “bflag_spawn”
origin “6454 6707 -250”
spawnflags “1”
}
create
{
scriptName “bflag_spawn6”
classname “team_CTF_bluespawn”
targetname “bflag_spawn”
origin “6454 6665 -250”
spawnflags “1”
}
create
{
scriptName “bflag_spawn6”
classname “team_CTF_bluespawn”
targetname “bflag_spawn”
origin “6454 6613 -250”
spawnflags “1”
}
create
{
classname “team_WOLF_checkpoint”
target “bflag_spawn”
targetname “upperbunkerflag”
scriptname “upperbunkerflag”
spawnflags “1”
objflags “4”
origin “6576 6675 -300”
}

  setstate bflag_wobj invisible
  setstate upperbunkerflag invisible

}
}

upperbunkerflag
{
spawn
{
}

trigger allied_capture // Flag has been touched by an Axis player
{
wm_announce “Allies have captured the Upper Way Spawn!”

  alertentity bflag_spawn
  setautospawn "Upper Way Spawn"			1
  wait 50
  setstate upperbunkerflag invisible
  setstate bflag_wobj default

}
}


(acQu) #5

[QUOTE=Kynval;416332]soo… tell me:

scriptName -> my name (not very important
classname “team_CTF_bluespawn” (axis or allies spawn - important)
targetname “fueldumphq_spawn” (whats that? what needs to add here?)
origin “-10918 -2288 512” (possision)
spawnflags 2 // TEAM_ALLIES (its tells about setspawnpt ?)[/QUOTE]

Scriptname is name of scriptroutine for entity.
Targetname is identifier for entity.


(Kynval) #6

doesn’t work:

			create
 {
 "scriptname" "goldclip"
 "targetname" "goldclip"
 "spawnflags" "8"
 "angle" "45"
 "origin" "478 -2674 -39"
 "classname" "team_CTF_bluespawn"
 }
			
		create
 {
 "scriptname" "alliedeastcorridor"
 "targetname" "alliedeastcorridor"
 "spawnflags" "9"
 "angle" "45"
 "origin" "478 -2674 -39"
 "classname" "team_CTF_bluespawn"
 }

(Mateos) #7

May sounds stupid, but have you checked if your custom .script is loaded?

Happened to me twice, I tested with wm_announce on top of the modified .script; Following the tut acQu posted, I’ve been able to add clips/spawn points on first attempt :slight_smile:


(Kynval) #8

yes it is…
once it was worked, but for many spawnpoints, like 2,3,4 … i need for 1 only


(Kynval) #9

what tells “spawnflags” “2” ?

cuz when i put there 2, spawn works in spawnpoint 2,3,4,8,9


(Mateos) #10

It must be 3.
1 -> Invulnerable. Enable it, or the player will be insta-killed on spawn.
2 -> Active on startup.

So 1+2=3 :slight_smile:


(Kynval) #11

goood, thx… but, tell me…
now its 4 many spawnpoints, i need for 1 only… how to do it?

			create
{
   scriptName "eastcorridor_spawn"
   classname "team_CTF_bluespawn"
   targetname "eastcorridor_spawn"
   origin "478 -2674 -39"
   angle "45"
   spawnflags "3"   // TEAM_ALLIES
}

(Mateos) #12

Maybe try the one you want with spawnflags 3 and the other ones with spawnflags 1, so only one is enabled and since there’s several it will work? ^^’


(ailmanki) #13

The code you posted would create exactly one spawpoint. Which can be reused though.
I suppose I don’t understand what you want.