Home   Help Search Login Register  

Author Topic: spawning enemys when trigger is activated  (Read 411 times)

0 Members and 1 Guest are viewing this topic.

Ice Man 3:16

  • Guest
spawning enemys when trigger is activated
« on: 13 Apr 2004, 04:16:51 »
Is it possible to have a trigger that continuously spawns  enemys when you activate the trigger, and possibly a trigger to turn off the enemy spawn when you leave?

I'm mainly interestd in the trigger to spawn enemys, shutting off enemy spawn is not as important.

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:spawning enemys when trigger is activated
« Reply #1 on: 13 Apr 2004, 06:05:43 »
There are some spawning scripts in the editor depot.  You could make a trigger that when activated would execute one of these respawn scripts.  You could also put a createunit command in the trigger, but this would only make one unit at a time. Eg. in the on activation filed:

Code: [Select]
"SoldierWB" createUnit [getMarkerPos "barracks", groupAlpha
For MP make sure you make also have game logic called "server" and this line at the begining of the script:

Code: [Select]
?!(local server) : exit
If you put the createunit command directly in the trigger for MP you will have to put in the condition field of the trigger:

Code: [Select]
this and (local sever)
Hope this helps (you might want to double check my command syntax also).