hey guys looking to make a script to place sand bag wall where the player is looking and give the object the same direction as the player in MP with Respawns but i also want it to check if the player has a toolkit in order to place it.

i know i will need a addAction to do this and to set a condition for respawn so the palyer gets the action again after death.

im thinking something like this would be a start but not sure how to set it up

I've also had a idea where you whouldn't be able to remove sandbags if it was placed by another side, do you need that sort of thing?

EDIT (30/09/2015): Improved script. If the player dies during an animation the action is now canceled, also only players of the same team can remove sandbags.

This post was edited by 654wak654 (2016-04-02 04:09, 716 days ago)

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

oh i just had a idea could we add a build time to it like a progress bar so we could add other objects like bunkers but that would take time to build up realistically. sand bags would take like 5 seconds and bunkers would take 30 to 60 seconds. kinda like the revive option in the vanilla Arma revive.

I kinda don't see how a whole bunker whould appear, and sandbags are deploying quick enough so they don't need a progress bar. If you want more advanced stuff you could use [R3F] Logistics instead of us making a small less practical version of a logistics script.

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

Which action? The addSandbagAction should be usable regardless. If not there is a whole unseen problem.

Putting this line instead of line #4 should fix the remove action for JIP though:

[_sb, (_this select 2)] remoteExec ["removeAction", 0, true];

This post was edited by 654wak654 (2015-09-22 15:45, 909 days ago)

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#654wak654 :
How is your setup? Just tested it and it seems to work as usual.

In what way?
its a normal dedicated server running the wasteland missionthe only part of it that doesnt work is leaving the sandbag every other part of it works. i even tried changing the type of sandbag but no go

I can't see any reason why it whould go all the way to the animation then just not create the sandbag. Maybe there is a security thing in the wasteland mission or your server, blocking some scripts from using the createVehicle command. Can't do anything on my part.

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.