Random spawns


(Haohmaru) #1

Hi
i have a problem to make a duel map of mine
most of the map is finished, i have some ideas yet, but i came across a problem with spawns…
map is a little arena to train skill in close-combat.
so there are some spawns around the map, and for spawncamping reasons those spawn has to be random, but they arent, and i dont know how to make them random, becose players are spawning in one place, but there are more spawnpoints :confused:
i managed to make spawns that i can choose from command map, or by setspawnpt binds, but that isnt too good for duels
can someone help me with it ?


(Loffy) #2

Hi!
Have you used the blue and red spawn boxes? I am not sure that those will work, for your map. Maybe you should try the pink spawn box instead (info_player_deathmatch I think it is called)?
Good luck! Random spawns are neat, in a death match arena.
:blah:
// Loffy


(Haohmaru) #3

yes i tried it, game will disconect and say “no spawnpoints found” if i dont use red/blue spawnboxes

isnt there any way to do those random spawns ?
please im desperate :frowning:


(Drakir) #4

This could be done with alot of scripting.

If you make several spawn points and then give em scriptnames and targetnames, then u can use a random accum so select a number to be the active one.

But may have to trigger the random script stuff somehow. So perhaps u can do a trigger_multiple that spans across the whole map triggering a target_script_trigger that triggers the scriptpart that makes the random selection of the accum.

Dunno if this can be done, if just thinking out loud.


(Erik-Ftn) #5

make an entity and give it a scriptname

script

my_scriptname
{
spawn
{
wait 200
trigger my_scriptname loop // this will make it auto-trigger at start
}

loop
{
here you script the following:

turn off the “old” random spawnpoint

accum 1 random X // X is # random points, this picks a new point

turn on the new random spawnpoint

wait 5000 // how long till new point

trigger self loop // start all over again
}

you might want to have one main spawnpoint area which are never switched off so you’ll never have all spawnpoints switched off (might cause an error)

the off/ on thing will look something like

trigger off_on
{
accum 1 trigger_if_equal 1 self no1
accum 1 trigger_if_equal 2 self no2
.
.
.
}

trigger no1
{
alertentity spawnpoint_1_targetname
}

trigger no2
{
alertentity spawnpoint_2_targetname
}

.
etc.
.

BTW
if u have different scripting routines for loop and on/off u need to use globalaccum in stead of accum.

Good luck