Help - Search - Members - Calendar
Full Version: How to know when a unit reached it's desired destination?
Armed Assault Info Forums > English > Armed Assault > Mission Editing & Scripting
SGJackson
Hallo all!!

I'm making my simple drop script... it's looking good so far but i'm having a trouble...

when i fix this my script will be ready to upload!

This is my script:
CODE
#Drop
@godrop
_heli = createVehicle ["MH6",H,[], 0, "FLY"]
pilot moveindriver _heli
pilot domove getmarkerpos "dropzonem"
pilot land "GET OUT"
~2
_crate = createvehicle ["SpecialBoxWest",_heli,[],5,"NONE"]
~1
pilot land "NONE"
pilot domove H
pilot setpos getpos pilotpos
deletevehicle _heli
~1
goto "drop"


'godrop' will get activated by radio delta, done.
everything gets created and works just fine!
My only problem is that i don't know when has the pilot reached the marker...
i need that, when the pilot has reached it, this function will ocurr: pilot land "GET OUT" > it'll make the pilot to hover very low
and THEN, when he's already low, the crate (_crate) will get created near it.
and THEN, when the crate is on the ground the pilot goes up again (pilot land "NONE") and moves to the already placed 'H'.
Then the delete part is fine, the pilot goes to a defined place (pilotpos) and the heli gets deleted.




EDIT= Sorry guys, i've opened the ArmA II editing & scripting by accident... This is meant to work for ArmA I... Do what you need with this post wink.gif
D@V£
Moving to correct section.

You should be able to do this with the distance command:

BIKI page

Ie, use an IF statement with this sort of controller:
CODE
_heli Distance (getmarkerpos "dropzonem") < 25

Which will be true if the chopper is less than 25m from the object in question.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.