OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Cooba 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
-
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"
-
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.
-
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 (http://www.ofpec.com/editors/resource_view.php?id=526)
c.) Search for other respawn scripts in the EditorsDepot up there