hi, this my first post and a rather simple question ( i hope)
im calling this script with a trigger, it orders a soldier to move an ammodump and perform a working animation. unfortunately i haven't found out yet how to check if the soldier has reached the assigned position (game logic named "dump"). but i need this check, otherwise the guy first goes through the anim and afterwards proceeds to the ammodump.
script enclosed below
edit: the position check always produces the error "type array, expected number,string,object,side,group"
;find position of ammocache
_cachepos = getpos dump
_cachex = _cachepos select 0
_cachey = _cachepos select 1
_cachez = _cachepos select 2
;soldiers move to ammocache
ap5 domove [_cachex, _cachey,0]
~5
;check if soldier has reached position
_soldierpos = getpos ap5
_soldierposx = _soldierpos select 0
_soldierposy = _soldierpos select 1
_soldierposz = _soldierpos select 2
?(_soldierpos == _cachepos): goto "loop"
;soldier performs animation
#loop
ap5 playmove "CombattoPutDown"
exit
any help greatly welcome ;D