Jump to content
Sign in to follow this  
alacasam

need help please

Recommended Posts

Hello , i want to create a chopper in a script , but i want it to be already in flight (engine already on when its created)  , right now , the engine start but by the time it does my chopper crash to the ground.And by the way is there a way to make it hover. can someone help me smile_o.gif  ?

Quote[/b] ]

_Plane1 = _this select 0

_plane2 = _this select 1

_player = player

_plane2 = "x35vtol" camCreate [(getPos _plane1 select 0),(getPos _plane1 select 1),(getPos _plane1 select 2)]

_plane2 engineon true

_plane2 setPos [(getPos _plane1 select 0),(getPos _plane1 select 1),(getPos _plane1 select 2)]

_plane2 setVelocity [(velocity _plane1 select 0)*2,(velocity _plane1 select 1)*2,(velocity _plane1 select 2)*2]

_heading = getDir plane1

_plane2 setDir _heading

deleteVehicle _plane1

_player assignAsDriver _plane2

_player moveInDriver _plane2

~1.5

[_plane2] exec "\x35\sqs\vtolactiv2.sqs"

goto "exit"

#exit

exit

Share this post


Link to post
Share on other sites

If we can do it in editor(select option in flight the helo start in flight with engine running max speed), there should be a way to do it in a script ? sad_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]If we can do it in editor(select option in flight the helo start in flight with engine running max speed), there should be a way to do it in a script ?

Not really, the game\editor and scripts dont always work in the same way sad_o.gif Perhaps in OFP2 they will be more closely intergrated.

Using the Setpos in a loop should fix any vehicle in one spot. After you camcreate try launching this script:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[_Plane2,GetPos _Plane1] Exec "LoopPos.sqs"

Loop.sqs:

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

_Pos=_This Select 1

#L

_Plane Setpos _Pos

~0.01

goto "L"

The question is, when do you want to stop the loop? After a set length of time or using a boolean e.t.c

But if your trying to make a smooth transition from one object to another for a VTOL script? Using camcreate and setpos could be tricky.

Share this post


Link to post
Share on other sites

if I would like it to end it with time period of 4 sec how would i do it?

Share this post


Link to post
Share on other sites

I think your right, the transition is not smooth enought,i think im gonna find another way. thank for everything wink_o.gif

Share this post


Link to post
Share on other sites

if you setpos it high enough, it will have time to gain speed

it's easier with planes (250m is enough), with choppers you will need to experiment a bit

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  

×