lawndartleo 109 Posted June 3, 2019 So I use the following script to spawn a vehicle on a marker... _slingammo = "B_Slingload_01_Ammo_F" createvehicle (getmarkerpos "huron_pickup"); ... and this works great over land. The problem is that I want to have that marker on a ship (carrier in this case) and this doesn't quite work. The crates are spawning under water so the marker must be attached to the sea floor. How do I make the object spawn at a specific height, specifically deck carrier deck height? I've gone over the alphabet soup on the BI wiki and its all Greek to me. Share this post Link to post Share on other sites
jshock 513 Posted June 3, 2019 (edited) Make sure that the marker is set properly in 3D space in the editor (as in the proper height on the ship) and make this small change to your code. If the first option doesn't work, try the second and change the marked value. Info: getMarkerPos set _slingammo = "B_Slingload_01_Ammo_F" createvehicle (getmarkerpos ["huron_pickup",true]); //getMarkerPos ["myMrk",true] returns a position array with [x,y,z] /////OR _slingammo = "B_Slingload_01_Ammo_F" createvehicle (getmarkerpos "huron_pickup") set [2,*properHeightOfShipSurface*]; //getMarkerPos "myMrk" returns a position array as [x,y,0] //subsequently using 'set [2,someNumber]' overwrites that zero to whatever value you input EDIT: After seeing that you actually can't easily set the marker height via editor and noticing the return of getMarkerPos [array] is positionAGL you may run into problems since you're on a ship. Second option is your best option. Edited June 3, 2019 by jshock 2 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted June 3, 2019 4 hours ago, lawndartleo said: its all Greek to me. Hello there lawndartleo ! You can also see a different approach , check the script below , ask me if you don't understand : Share this post Link to post Share on other sites
dave_beastttt 135 Posted June 3, 2019 You will need to use ASL position https://community.bistudio.com/wiki/setPosASL 1 Share this post Link to post Share on other sites
Larrow 2823 Posted June 3, 2019 Use setVehiclePosition should set the vehicle on the first walkable surface( the ship ). 1 Share this post Link to post Share on other sites
lawndartleo 109 Posted June 9, 2019 Thanks for the input, everyone. I settled on the below approach simply because it is the one I can get my head around. I don't know if this is the best approach but so far it works for all objects that I have a spawning script for. On an object as an addAction this addAction ["REQUISITION A CARGO NET (ACE ARSENAL)","scripts\huron_cargonet.sqf"]; The script _position = getMarkerPos "huron_pickup"; _spCheck = nearestObjects[_position,["B_Slingload_01_Ammo_F","B_Slingload_01_Cargo_F","B_Slingload_01_Fuel_F","B_Slingload_01_Medevac_F","B_Slingload_01_Repair_F","B_CargoNet_01_ammo_F"],500] select 0; if(!isNil "_spCheck") then {deleteVehicle _spCheck;}; sleep 1; _cargonet = "B_CargoNet_01_ammo_F" createvehicle (getmarkerpos "huron_pickup"); _cargonet setPosASL [position _cargonet select 0, position _cargonet select 1, 23.75]; clearMagazineCargoGlobal _cargonet; clearWeaponCargoGlobal _cargonet; clearItemCargoGlobal _cargonet; [_cargonet, true] call ace_arsenal_fnc_initBox; hint "CARGO NET (ACE ARSENAL) DELIVERED!"; Share this post Link to post Share on other sites