Mok Sith 0 Posted January 28, 2008 ok, i KNOW this has been covered somewhere, and just spent the last hour trying to search for it, but with no luck....maybe i am just using the wrong keywords..... so if someone knows the thread(s) that covered this please direct me there....i have search burnout hehe ok...i read a while back, about changing a vehicle simulation..i.e. simulation="helicopter" to simulation="plane"...and then back again, of course this all in game.... the solution was to use some sort of destroy command ( destroy the heli ) and then create command ( create the plane where the heli was ) and reverse process to go the other way.... i remember something about the only problem would be the newly created object would spawn in at zero velocity.... does anyone know what i am talking about? i tried searching "class", "simulation", "destroy", "multi class"....i just can't seem to find it.... thanks in advance for any help... laters Share this post Link to post Share on other sites
Pulverizer 1 Posted January 28, 2008 I'm quite sure you need to have two vehicle classes for such switcheroo. You could use a script like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_vehicle = _this select 0 _pilot = _this select 1 _actid = _this select 2 ?_pilot!=driver _vehicle:exit _vehicle removeaction _actid _newtype = if(typeof _vehicle=="Mi24")then{"Su25"}else{"Mi24"} _pos = getpos _vehicle _dir = getdir _vehicle _vel = velocity _vehicle call{deletevehicle _vehicle;_vehicle = _newtype createvehicle _pos;_vehicle setdir _dir;_pilot moveindriver _vehicle} _vehicle setpos _pos _vehicle setvelocity _vel _vehicle addaction ["Switch", "switch.sqs"] The problem is switching to a chopper because it will start with 0 rpm, maybe have an AI keep the engine running before the switch. Also, retaining the exact amount of ammo could be difficult but perhaps possible with some AI trickery. Share this post Link to post Share on other sites
Mok Sith 0 Posted December 19, 2009 i know this is like maybe that latest reply to a post...but i lost my PC shortly after making the original post and just now started to get back into editing ofp... i ill try that out!!! so if you are still around Pulverizer, THANKS!!! Share this post Link to post Share on other sites