OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: BuhBye on 04 Jun 2007, 22:14:32
-
Hi guys Ive got this up on the BIS forum and so far Im getting nothing that works.
The deal...
The script works fine until it gets to the #drop. When everyone gets out the chopper just sits there. Any ideas? Thanx
helo1 flyinheight 30
helo1 setbehaviour "stealth"
helo1 domove getpos start1
helo1 setspeedmode "NORMAL"
#loop
?helo1 distance start1 < 300 : goto "land"
~0.5
goto "loop"
#land
helo1 setspeedmode "NORMAL"
helo1 land "GET OUT"
_height = getpos helo1 select 2
?_height < 1 : goto "drop"
~0.5
goto "land"
#drop
helo1 flyinheight 0
@(not((w1 in helo1) or (w2 in helo1) or (w3 in helo1) or (w4 in helo1) or (w5 in helo1)))
goto "leave"
#leave
helo1 domove getpos gone1
helo1 flyinheight 30
helo1 setspeedmode "FULL"
@helo1 distance gone1 < 200
goto "empty"
#empty
deletevehicle helo1
exit
-
Figured it out thanx.
-
Could you enlighten me as to what the problem was and how you fixed it?
-
Sure Landdon...
#drop
helo1 flyinheight 0
@(not((w1 in helo1) or (w2 in helo1) or (w3 in helo1) or (w4 in helo1) or (w5 in helo1)))
goto "leave"
#leave
helo1 domove getpos gone1
helo1 flyinheight 30
helo1 setspeedmode "FULL"
@helo1 distance gone1 < 200
goto "empty"
When I ran it, the chooper would land, all got out and it just sat there. So I ASSuMEd the "not in" check didnt work. So while testing it I put a "hint" message in right after the "@(not((w1 in helo1) or (w2 in helo1) or (w3 in helo1) or (w4 in helo1) or (w5 in helo1)))" and the hint went off so I knew the check worked. Then I looked at it and HIT myself cause "start1" is an invis. H (object) and "gone1" is an empty marker, thus "helo1 domove getpos gone1" didn't work. As soon as I changed it to "helo1 domove getMARKERpos "gone1" it worked great.
I tried about 6 different checks and like 7 hrs chasing that! Ahhh the joys of scripting.
-
Did you update your version in the Beta Thread?
-
Yes I did Peanut. :D