Page 1 of 1

Triggerable bots and bot spawns

Posted: Fri Jun 11, 2004 6:12 pm
by CommandoKiller
how would u trigger bots to stand still until the trigger is active, then move to another area. Like if allies had to go down a hall, and i wanted the axis to stay under cover until the allies got closer for example.

and also, is there a way to close and open bot spawn points? like once a team moves into enemy territory and overruns the original bot spawns, is there a way to trigger those to not spawn anymore bots?

Posted: Fri Jun 11, 2004 6:17 pm
by jv_map
1st: not possible with jv_bots.

2nd: yes you can do $alliespawn[number].disablespawn = 1

To indentify spawn positions (since they all have the same targetname) it's probably convenient to add another variable to them, for instance key / value '$tag' / 'sometagname'.

Then in your script you could easily make a thread like this:

Code: Select all

findspawnposwithtag local.tag local.targetname:
  for(local.i = 1; local.i <= $(local.targetname).size; local.i++)
  {
    local.ent = $(local.targetname)[local.i]
    if(local.ent.tag == local.tag)
      end local.ent
  }
end NULL
And somewhere else have:

Code: Select all

local.somespawnpoint = waitthread findspawnposwithtag "sometagname" "alliesspawn"
Good luck 8-)