GODSPEEDSNAKE 12 Posted July 9, 2021 Hi all sorry been searching for ages trying to make it work and the last part of this script just doesn't seem to work, I know I must be doing something wrong :( pls help... I managed to get the script to work and the box spawns near the player however I'm trying to get the 'init' for the spawned item to work attaching either the 'arsenal' addAction or filling the box cargo up with ammo and weapons' The issue is getting the 'init' to work _spawn = "Land_WoodenBox_F"; _posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0]; _dirplr = getDir player; _spwnveh = _spawn createVehicle (_posplr); _spwnveh setVariable ["Sarge",1,true]; _spwnveh = setVehicleInit ["this addAction "<t color='#00aeff'>ARSENAL</t>","scripts\arsenal.sqf", [false], 1, false, true, "", "(_target distance _this) < 3"]; Share this post Link to post Share on other sites
Harzach 2517 Posted July 9, 2021 setVehicleInit (and a few similar commands) were removed way back in 2013 during the Alpha for security reasons. Use remoteExec. 1 Share this post Link to post Share on other sites
GODSPEEDSNAKE 12 Posted July 9, 2021 Ok so how can I spawn a box and attached an add action? or empty a spawned ammo box and put my own chosen gear in it? If what ur saying is I can't use scripts to spawn and setVehicleInit... Cause the script I have works and spawns in the object just I dont know how to attach a addAction or edit what spawns inside the box... Share this post Link to post Share on other sites
beno_83au 1369 Posted July 9, 2021 You're already referencing the spawned object, just add the action to it, or add inventories, or whatever else you need to do with it. Example: _spwnveh addAction [//code]; You'll only need remoteExec if you're trying to script for multiplayer. But as Harzach said, setVehicleInit and it's related commands were disabled (as the linked wiki description states). 2 Share this post Link to post Share on other sites
Harzach 2517 Posted July 9, 2021 9 hours ago, beno_83au said: You'll only need remoteExec if you're trying to script for multiplayer. Laziness on my part, thanks @beno_83au 🙃 1 Share this post Link to post Share on other sites