![]()
Here's the deal - 4 Abrams (m1a1a - m1a1d) have completed a seek and destory objective and are awaiting support. Support should not approach tanks until they are stationary as they have to move on to another waypoint before being repaired by the support vehicle (reptruck).
The code is:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#wtforstop
?velocity m1a1a=[0,0,0]:goto "checka"
goto "wtforstop"
#checka
reptruck domove getpos m1a1a
#chka
?damage (m1a1a)==0:goto "checkb"
goto "chka"
#checkb
reptruck domove getpos m1a1b
#chkb
?damage (m1a1b)==0:goto "checkc"
goto "chkb"
#checkc
reptruck domove getpos m1a1c
#chkc
?damage (m1a1c)==0:goto "checkd"
goto "chkc"
#checkd
reptruck domove getpos m1a1d
#chkd
?damage (m1a1d)=0:goto "repaired"
goto "chkd"
#repaired[/QUOTE]
I keep getting told that there is an unknown operator (seems to indicate the "=". When I try a logical "==" it complains that I'm using an array where I should be using number, object, string.
How do I check that the tank m1a1a has come to a halt before I let the repair truck move in?
HOME
Reply With Quote
