Triggerable bots and bot spawns

Please use this forum to ask all your MoHAA Bots questions / discussions

Moderator: Moderators

Post Reply
CommandoKiller
Lance Corporal
Posts: 19
Joined: Sat Jul 26, 2003 2:06 am
Contact:

Triggerable bots and bot spawns

Post 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?
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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-)
Image
Post Reply