I am currently trying to make a game mode in which a random weapon will spawn on the exact location that i place another object (Eg. a flag) But currently any weapon i spawn inside a building will be moved to ground level beneath the floor of the building. Is there any way that i can spawn my weapon on the exact location that the initial object is so that it remains above floor level.
The code i use is:
gun = ["hgun_PDW2000_F", "SMG_01_F", "SMG_02_F"] call BIS_fnc_selectRandom;
if (gun=="hgun_PDW2000_F") then {vammo ="30Rnd_9x21_Mag"} else
{if (gun=="SMG_01_F") then {vammo="30Rnd_45ACP_Mag_SMG_01_Tracer_Green"} else
{if (gun=="SMG_02_F") then {vammo="30Rnd_9x21_Mag"}}};
//-----All of the above just defines the random weapon spawned.
Waffe1 = createVehicle ["groundweaponHolder",getPos this,[], 1, "can_collide"];
Waffe1 addMagazineCargo [vammo,1];
Waffe1 addWeaponCargo [gun,1];
Waffe1 setPos [getPos this select 0,getPos this select 1,0.00];
deleteVehicle this;
//Called with: [] call compile preProcessFileLineNumbers "RandomSMG.sqf"
Any advice is appreciated,
Thanks
This line:
Awesome, Thanks alot, didnt think that over complicating things would make me suffer.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)