OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: kokobang on 25 Feb 2004, 07:43:06
-
first... sorry i`m not good english
ummm i`m look forum and find AIspawn
AIspawn is always creatunit USE....
but i`m not comperhension
plz i want easy explain
i use
Man = _this select 0
_SpawnPoint = _this select 1
#LOOP
?(not (alive _Man)): Goto "SPAWN"
~1
Goto "LOOP"
#SPAWN
_Man setdammage 0
_Man setpos getpos _SpawnPoint
Goto "LOOP"
#loop
////////Made by RIMA///
but this ai not have sprite T.T
not attack and not move and not underattack
reply plz
-
Try it like this:
_Man = _this select 0
_SpawnPoint = _this select 1
#loop
@!(alive _Man): Goto "SPAWN"
_Man setdammage 0
_Man setpos getpos _SpawnPoint
goto "loop"
The @ sentace works faster than a loop with 1 second delay and the AI unit has a less chance of becoming a vegetable.
The errors I noticed in your script:
You're first defining global variable Man but later using local variable _Man.
You have two #loop bookmarks, and as I uderstand it, OFP is not case sensitive in these things and therefore can't see the difference in the two bookmarks.
-
There could be problems with it in single missions!
After dying, and after sedammage 0, the unit may be recognized as friendly, or unknow - you`r units will not shoot to him, byt this unit will shoot to all you`r targets!