Jump to content
Sign in to follow this  
MetalG

Chopper groundstart with engine running

Recommended Posts

Hi,

I'm trying to get a helicopter to start on the ground but with the engine already running. I need it to look as if the chopper has just landed and already unloaded all it's troops, and is now ready to fly away again.

Tried with flyinheight command but that makes the chopper go up first and then move to it's desired position, even if I try to use the setpos command from the FAQ.

Any ideas?

I've searched for this question but I couldn't come up with any results, although I do believe something similair has already been asked before, just can't find it.

Thanks in advance.

Share this post


Link to post
Share on other sites

[choppername] exec "StayDown.sqs"

Staydown.sqs

_chopper = _This select 0

Glabalcondition = FALSE

#lp

~.1

_chopper flyinheight 0

? (GlobalCondition) : Goto "Lp"

_chopper flyinheight 60

exit

With:

globalcondition as a global variable to be activated on the editor or in one different script (GlobalCondition = True) when you want the chopper leave the area.

wink_o.gif

Share this post


Link to post
Share on other sites

Have a chopper named heli set to 'Flying' and save this as init.sqs (gets executed automaticly) into the mission directory:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">heli flyinheight 0

; store initial pos

_px = getpos heli select 0

_py = getpos heli select 1

; keep heli in place for 2 seconds

#heliloop

heli setpos [_px, _py, 0]

heli setvelocity [0,0,0]

~0.01

?time < 2 : goto "heliloop"

exit

Share this post


Link to post
Share on other sites

Hey guys,

@Nicolas Eymerich: Thanks for the script however I could not get it to work properly, the helicopter still starts in the air for me?

@Metal Heart: Thanks for the script, I got it to work now, the chopper starts on the ground with engine running. Thanks!

Share this post


Link to post
Share on other sites

So does anyone know how to do this in ArmA with SQF syntax?

I've tried directly porting the script over, I've tried using triggers and engineOn. Sometimes the helo starts up and stays still, others it starts up and climbs to a 100ft hover sad_o.gif

Any ideas?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×