alacasam 0 Posted August 25, 2004 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  ? 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
alacasam 0 Posted August 26, 2004 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 ? Share this post Link to post Share on other sites
Unnamed_ 0 Posted August 26, 2004 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 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
alacasam 0 Posted August 26, 2004 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
alacasam 0 Posted August 26, 2004 I think your right, the transition is not smooth enought,i think im gonna find another way. thank for everything Share this post Link to post Share on other sites
redface 1 Posted August 26, 2004 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