Auto-choose the spawn


(diaboliksmart) #1

Hi ET fanatics !

I’ve got a little problem on a map :

Because I run a beginners server, people don’t have the reflex to open Limbo menu and to choose the respawn-point. And on the map I run, if you don’t do it, you always spawn on the “bumpers”, and it is quite annoying/boring to always jump like that each time you are born.

So I want to add something, I hope it is basic in mapscript, to force axis and allies to spawn always at the unique spawn. (Axis spawn at the left, and axis at the right)

The maps is (please don’t laugh or say it is for naabs ^^) q3dm17.pk3 :


The script inside pk3 is

game_manager
{
	spawn
	{
		// Game rules
		wm_axis_respawntime	5
		wm_allied_respawntime	5
		wm_set_round_timelimit	30

		
	}

	
}

The link to get the pk3 : http://wolfensmart.free.fr/etmain/q3dm17.pk3

My server to vote the map (people rarely choose it) : /connect smart.servequake.com

Thanks in advance, and have a good week-end :slight_smile:


(ailmanki) #2

http://games.chruker.dk/enemy_territory/scripting_reference.php#spawn_related

Simple enough, but you need to know the “description” string of the spawn you want to set. Also probably you will need to add spawns by mapscript, unless someone already add ET Spawns.


(diaboliksmart) #3

Thanks, so I need to add a line in the script like that ??

setautospawn <target_spawn> <team>
Set the autospawn of a team to ‘target_spawn’. The ‘target_spawn’ string is the ‘description’ key on the team_WOLF_objective.

Now, what means “‘description’ key on the team_WOLF_objective.” ? In which file of the pk3 is it ???

And no, I don’t want to add other spawns, just auto-select the existing one for each team.


(ailmanki) #4

Yes you need to add a line to the script. The problem is, you a entity of type team_WOLF_objective , unless someone edited that q3 map, there is no such spawn.

The information to figure that out is in the *.bsp , you can open it with a good texteditor, like notepad++ … it will be all gargage encoded content, except for a part somewhere in the file. You can search for “worldspawn” that should find the top of it. Then look for the entities team_wolf_objective, there are also those description keys. Actually those description keys should also be visible on the command map.
If there ain’t any, you will have to add your own spawns. You can check out this mapscript: http://wet.peyote.ch/airassfp1.script.zip
And look how I add there spawns. You can figure out the coordinates with console and command /viewpos


(diaboliksmart) #5

Thanks a lot for helping me ! :slight_smile:

So I have extracted the q3dm17.bsp.

I go on linux, to use “vi”.

I search “worldspawn”, it finds only one occurrence :

“classname” “worldspawn”
“mapcoordsmaxs” “3200 -1528”
“mapcoordsmins” “-1344 1608”
}

When I search “team_WOLF_objective”, it finds just two parts :

{
“description” “allies spawn”
“spawnflags” “2”
“target” “t100”
“origin” “-376 1216 600”
“classname” “team_WOLF_objective”
}

and

{
“classname” “team_WOLF_objective”
“origin” “-448 -992 608”
“spawnflags” “1”
“target” “t101”
“description” “axis spawn”
}

So to follow your instructions, I must add the 2 lines inside the script, but V27 (lol where to ?), is this correct ? I mean inside or outside spawn {} section ?

game_manager
{
	spawn
	{
		// Game rules
		wm_axis_respawntime	5
		wm_allied_respawntime	5
		wm_set_round_timelimit	30

                [B]setautospawn axis_spawn axis
                setautospawn allies_spawn allies[/B]
	}
}

Hmmm …there are also many lines with team_CTF_redspawn and team_CTF_bluespawn … :eek: is-it a problem in my case ? (there is no flag to capture in this map)


(Micha) #6

You need this:

{
“description” “allies spawn”
“spawnflags” “2”
“target” “t100”
“origin” “-376 1216 600”
“classname” “team_WOLF_objective”
}

{
“classname” “team_WOLF_objective”
“origin” “-448 -992 608”
“spawnflags” “1”
“target” “t101”
“description” “axis spawn”
}

mapscript:


game_manager
{
	spawn
	{
		// Game rules
		wm_axis_respawntime	5
		wm_allied_respawntime	5
		wm_set_round_timelimit	30

		setautospawn "axis spawn" 0 // 0 = axis
                setautospawn "allies spawn" 1 // 1 = allies
	}
	
}

bluespawn is allies and redspawn is axis :slight_smile:


(ailmanki) #7

Your welcome :slight_smile:
Almost correct the script, I don’t know if ET does anything with CTF spawns… maybe you can spawn there - no idea.
I add a wait 100 , like in battery script - just to be sure, and you put the description inside Quotes, and the team has to be set by numbers,

game_manager
{
	spawn
	{
		// Game rules
		wm_axis_respawntime	5
		wm_allied_respawntime	5
		wm_set_round_timelimit	30

                wait 100
                setautospawn "axis spawn" 0
                setautospawn "allies spawn" 1
	}
}

Yet just what Micha posted :), but maybe add the “wait 100” - just to be safe.


(Micha) #8

team_CTF_bluespawn/team_CTF_redspawn are the origins of the spawnpoints. So world knows where to spawn you at.


(ailmanki) #9

Ah true, forgot about that. Thanks for info :slight_smile:


(diaboliksmart) #10

Thanks guys ! You good teachers :smiley:
The q3dm17.script is now uploaded in “silent/mapscripts” folder, wait and see some beginners vote it :wink:
When I see how complex it is, I have full respect for mappers, they have to be technical and artistic in same time … Impressive ! (Quake3 sound lol)
See you soon @all good football evening :cool:

EDIT: it works like a charm - V55 xDDDDDDDDDDD