-)rStrangelove 0 Posted November 5, 2006 I had problems spawning a parachute via createVehicle. Why do i have to use camcreate ? What's the difference ? Â [edit] Thats the script i worked on. It spawns west paratroopers: INIT.SQS <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;busy_flag for spawning Wgrps: DS_lockW = FALSE; ;maximum number of spawngroups: DS_max_Wgrps = 3 ;spawned grps go here: DS_Wgrps = []; ;--------------------------------------- ;spawn 1 westgroup: [getpos player] exec "drop_Westgroup.sqs" DROP_WESTGROUP.SQS <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;drop_Wgrp.sqs Nov2006 by ])rStrangelove (_darth_vader_<AT>web.de) ;======================================================================== ;(Reedited SpawnManager2 script) ;It spawns & drops 12 west group units via parachute over given position ;Call with: ;[pos] exec "drop_Westgroup.sqs" ;pos over which the parachutes will drop ;required: ; - west officer placed in editor somewhere, with init line: ; W_dummygrp = group this; ; - west soldier placed in editor, can be dead ;======================================================================== ;drop height _height = 200; _droppos = [(_this select 0) select 0,(_this select 0) select 1,_height]; ;define unittypes: ;(all Wtypes have to be placed in editor once to prevent spawnlags) _Wtypes = ["OfficerW","SoldierWB"]; ;----------------------------------------------------------- ;wait for busy flag #busy_wait ~0.2 ?(DS_lockW):goto "busy_wait"; DS_lockW = TRUE; ;exit if max grps have spawned already: ?(count DS_Wgrps >= DS_max_Wgrps):DS_lockW = FALSE;EXIT; _grp = grpNull; _errornr = 0; #spawn_leader para = "ParachuteWest" camcreate _droppos; (_Wtypes select 0) createunit [[1,1,1000],W_dummygrp,"this moveindriver para"]; ~1.5 ?!(count units W_dummygrp > 1) AND (_errornr > 2):hint "ERROR: drop_Wgrp";EXIT; ?!(count units W_dummygrp > 1):_errornr = _errornr + 1;goto "spawn_leader"; _leader = units W_dummygrp select ((count units W_dummygrp) - 1); [_leader] join _grp; _grp = group _leader; #spawn_rest ~2 _droppos = [(_droppos select 0) + 7,(_droppos select 1) + 7,(_droppos select 2) + 3]; ~0.5 para = "ParachuteWest" camcreate _droppos; (_Wtypes select 1+(random(count _Wtypes - 2))) createunit [[1,1,1000],_grp,"this moveindriver para"]; ?(count units _grp < 12):goto "spawn_rest"; ;add to global array: DS_Wgrps = DS_Wgrps + [_grp]; ;unlock busy flag DS_lockW = FALSE; ;wait until all parachutes are on the ground: #land_wait ~5 ?("vehicle _x == _x" count units _grp != count units _grp):goto "land_wait"; ~5 ;mission designer is free to use the _grp now: player sidechat format["This is %1: awaiting further orders...",_grp]; EXIT; Share this post Link to post Share on other sites
bn880 5 Posted November 5, 2006 Parachutes need to have a setpos above ground right after they are created. Otherwise they just touch down and disappear. (from old memories) Share this post Link to post Share on other sites
sanctuary 19 Posted November 5, 2006 I don't know why the parachute creation does not work with createvehicle, even if setpos at hundred of meters. In a mission i had the same exact problem, those damned parachutes never appeared with createvehicle whatever i could do and try, but when i tried using camcreate instead of createvehicle it worked perfectly , the parachutes appeared at the good position, correct height and soldiers could be moveindriver in them without any bug. Maybe the createvehicle command ignore the height you define and will spawn a vehicle on ground level for 0.0001 seconds or less, before throwing it to the height you define, triggering the built in OFP code that make parachute disappearing when it is under a specific height. Share this post Link to post Share on other sites
igor drukov 0 Posted November 5, 2006 bn880 is right. You can CreateVehicle chutes if you use SetPos right after: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_ch={parachutewest} createVehicle [_x,_y,_z] won't work. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_ch={parachutewest} createVehicle [_x,_y,_z] _ch setpos [_x,_y,_z]will. Share this post Link to post Share on other sites
sanctuary 19 Posted November 5, 2006 So the createvehicle really ignore , even if just for a micro second, the _z height you give to it in the 1st command ? Share this post Link to post Share on other sites
igor drukov 0 Posted November 5, 2006 Apparently so. Positions in CreateVehicle commands aren't that accurate if only because the engine makes sure the new object doesn't collide with previously existing ones. SetPos has more "bypassing power". The use of CreateVehicle in MP is besides recommended because other players won't see camcreated chutes (as Camcreated objects only exist locally)... Share this post Link to post Share on other sites
sanctuary 19 Posted November 5, 2006 Interesting to learn about it, after all the time parachutes have annoyed me with spawning scripts after all there was a solution other than camcreating them. Share this post Link to post Share on other sites