sic-disaster 311 Posted January 7, 2014 I'm working on a defense mission, and I would really like to enable the player to place his own (limited amount of) fortifications like sandbag walls, objects to block vehicle movement etc. I remember this type of mission from a Red Hammer campaign and always loved it, so I wanted to recreate something similar. Is it possible in ArmA 3? Share this post Link to post Share on other sites
alky_lee 279 Posted January 7, 2014 You should be able to. One of the groups put up a video on youtube demonstrating just this. https://www.youtube.com/watch?v=23FlY6-v10w Share this post Link to post Share on other sites
sic-disaster 311 Posted January 8, 2014 Interesting. Wonder if there are any other ways too, as this looks a bit too complicated for what I have in mind. Share this post Link to post Share on other sites
tinter 186 Posted January 8, 2014 Maybe just adding an action to the sandbags that attaches it to the player, forcing walk and putting them into an animation. Share this post Link to post Share on other sites
iceman77 18 Posted January 8, 2014 (edited) Hi. Maybe something like this can give you some ideas. SiC_fnc_placeSandBag = { _sandBag = createVehicle ["Land_BagFence_Round_F",(_this select 1) modelToWorld [0,2,0], [], 0, "CAN_COLLIDE"]; _sandBag setDir getDir (_this select 1) - 180; (_this select 1) removeAction (_this select 2); _id = _sandBag addAction ["Remove Sandbag", {call SiC_fnc_removeSandBag}]; }; SiC_fnc_removeSandBag = { deleteVehicle (_this select 0); _id = (_this select 1) addAction ["Place Sandbag", {call SiC_fnc_placeSandBag}]; }; _id = player addAction ["Place Sandbag", {call SiC_fnc_placeSandBag}]; Edited January 8, 2014 by Iceman77 Share this post Link to post Share on other sites
SavageCDN 231 Posted January 8, 2014 by no means simple but this works for A3 http://www.armaholic.com/page.php?id=9285 Share this post Link to post Share on other sites
hansson0728 12 Posted January 9, 2014 iceman where did you find that script ?? i would like to get a look at the complete script, if it is possible. ? Share this post Link to post Share on other sites
iceman77 18 Posted January 10, 2014 iceman where did you find that script ?? i would like to get a look at the complete script, if it is possible. ? Hi. I wrote it after reading the original post. There is no additional code. Share this post Link to post Share on other sites
hansson0728 12 Posted January 10, 2014 aha okej ;) i thought you found it somewhere :) someday i will be able to pull of functions freestyling like that to :) Share this post Link to post Share on other sites
sic-disaster 311 Posted January 14, 2014 Hi. Maybe something like this can give you some ideas. SiC_fnc_placeSandBag = { _sandBag = createVehicle ["Land_BagFence_Round_F",(_this select 1) modelToWorld [0,2,0], [], 0, "CAN_COLLIDE"]; _sandBag setDir getDir (_this select 1) - 180; (_this select 1) removeAction (_this select 2); _id = _sandBag addAction ["Remove Sandbag", {call SiC_fnc_removeSandBag}]; }; SiC_fnc_removeSandBag = { deleteVehicle (_this select 0); _id = (_this select 1) addAction ["Place Sandbag", {call SiC_fnc_placeSandBag}]; }; _id = player addAction ["Place Sandbag", {call SiC_fnc_placeSandBag}]; Thanks Iceman! How would I go about implementing this? I assume I need to copy that into an .sqf file and call for it in a unit init line? Share this post Link to post Share on other sites
iceman77 18 Posted January 14, 2014 Copy and paste it into your init.sqf. Hit preview. Share this post Link to post Share on other sites
ricko3 19 Posted January 15, 2014 (edited) Yea that's great, I just loaded it up instead of using it in the init.sqf I put It in a separate file and called it from an engineer. But to no avail for what I was trying to do. I want it so only the engineer class can use it I assume I have to edit the script to change it. Thanks for the great codE!!! Edit - Sorry being really stupid - Changed - player to engineer instead and got it to work exact!!!!! Edited January 15, 2014 by ricko3 Share this post Link to post Share on other sites