lawndartleo 109 Posted December 3, 2016 I'd like to have an object in my MP scenario that can spawn an ammo crate using an addaction. I've tried using this one (https://forums.bistudio.com/topic/193093-request-ammo-box-spawner/?hl=spawn+ammo) but to this point, no success. Walk up to something that has an addAction request crate (B_CargoNet_01_ammo_F, for example) crate spawns near player sleep the script for X amount of time so people can't spam Share this post Link to post Share on other sites
Tajin 349 Posted December 5, 2016 https://community.bistudio.com/wiki/createVehicle What is the problem there? Define "no success". 1 Share this post Link to post Share on other sites
lawndartleo 109 Posted December 5, 2016 Added that EXACT text to my initplayerlocal. Aded an object and gave it the name YOUROBJECT to put any naming issues out of the mix. No addaction seen... At least testing locally. What exactly is a GLOBAL OBJECT? Just a map object in the mission, or something more specific? Share this post Link to post Share on other sites
lawndartleo 109 Posted December 6, 2016 Im confused... YOUROBJECT addAction ["Spawn Ammobox",{createVehicle ["Box_NATO_Wps_F",position YOUROBJECT, [],10,"NONE"];}]; ... works But this.... YOUROBJECT addAction [ "Spawn Ammobox", { createVehicle ["Box_NATO_Wps_F",position YOUROBJECT, [],10,"NONE"]; } ]; ... does not. The difference is I made it all one line. Share this post Link to post Share on other sites
killzone_kid 1331 Posted December 6, 2016 what is full name of the file you are adding the text to? Share this post Link to post Share on other sites
lawndartleo 109 Posted December 6, 2016 initPlayerLocal.sqf Share this post Link to post Share on other sites
killzone_kid 1331 Posted December 6, 2016 did you put this exec "initPlayerLocal.sqf" anywhere? Share this post Link to post Share on other sites
lawndartleo 109 Posted December 6, 2016 Nope, just followed this thread, nothing else. https://forums.bistudio.com/topic/193093-request-ammo-box-spawner/?hl=spawn+ammo Share this post Link to post Share on other sites
killzone_kid 1331 Posted December 6, 2016 Are you sure? Because the fact that your have to put SQF code in 1 line is consistent with it being executed as SQS, and exec command is exactly what would do it. Also some other thread you linked to was suggesting to add this exec "initPlayerLocal.sqf" to player init. Are you sure you havent added it and forgot to remove? There is no other reason why initPlayerLocal.sqf would execute as SQS unless you forced it yourself. You also shown some examples when you execute another SQF code as SQS Share this post Link to post Share on other sites