spawning points of bots

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

Moderator: Moderators

Post Reply
sg.Pepper
Second Lieutenant
Posts: 152
Joined: Tue Jan 13, 2004 2:47 pm
Location: Czrch Republic
Contact:

spawning points of bots

Post by sg.Pepper »

Hi
how can i make disable spawn of bots in some spawn points and in some enable spawn?
Example: There are two bombs. One spawn point is before 1. bomb and second spawn point is behind 1. bomb.
I want to enable spawn before 1. bomb and disable spawn behind 1. bomb. When 1. bomb exploded, i want to disable spawn before 1. bomb and enable spawn behind 1. bomb.
Can somebody help me?
Thenks.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yup you can set the .disablespawn variable for a spawnposition to 1 to prevent spawning from that spawn pos 8-)

It is a bit hard though to implement this into your script, as all spawnpositions need to have targetname alliesspawn or axisspawn. A way to get around this is by supplying the spawns you want to be disabled an additional key / value in radiant, like #spawntobedisabled / 1.

Then in your script you could do something like this:

Code: Select all

for(local.i = 1; local.i <= $alliesspawn.size; local.i++)
{
  local.spawn = $alliesspawn[local.i]
  if(local.spawn.tobedisabled == 1)
  {
    local.spawn.disablespawn = 1
  }
}
See? :)
Image
Post Reply