Home   Help Search Login Register  

Author Topic: Respawn AI  (Read 520 times)

0 Members and 1 Guest are viewing this topic.

Cooba

  • Guest
Respawn AI
« on: 14 Oct 2003, 00:33:33 »
Please, i need simple script to respawn AI soldiers.

i wrote simple script to respawn AI soldiers:
its activating in unit INIT field

#loop
~60
? (not alive _this) : _this setpos (getpos marker); _this setdammage 0;
goto "loop"


This script doesnt work gut. Sometimes soldier respawn sometimes not. I dont know why.

Please help me. I know its simple problem but im green.
thx

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:Respawn AI
« Reply #1 on: 14 Oct 2003, 17:11:49 »
1. I think you have to respawn quicker. 60s are too long, maybe try 10s.

2. To get the position of a marker, the correct command is: getMarkerPos "marker"

Cooba

  • Guest
Re:Respawn AI
« Reply #2 on: 15 Oct 2003, 01:25:33 »
I try 10s and 100s and others. Alway bad, no matter how long is time of delay.
I try many options of getpos. This work correct. My problem is that AI often doesnt respawn - only dead body changing position.

Sorry for my english. I will be better in future, i still learning.

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:Respawn AI
« Reply #3 on: 15 Oct 2003, 22:43:58 »
You haven't posted your whole script - those few lines up there don't spawn anything.  ;D

So - ...

a.) You could either post the whole script and some info how exactly you activate it in the mission editor.

b.) You could try my little "PatrolSpawnManager" here: http://www.ofpec.com/editors/resource_view.php?id=526

c.) Search for other respawn scripts in the EditorsDepot up there