Jump to content
  • 0

Open / Close Land container doors


Galian

Question

Hello everyone, this might be a really simple question, but I have been trying some code for days, and I can't get it to work.

 

They Idea I have is to have a container looked down (doors disabled) and open them with an action. (this way I think is much more realistic to provide the users with a some loot, instead of poping a loot box from nowhere in the middle of the zone). The idea is you open the box, and inside you find a GunRack that gets filled with the loot.

 

I managed to make it work, and doors get enabled once the script has ended. But of course I need that box to get closed again and get its doors disabled after sometime, and I cant get this "animateDoor" to work in the container.

 

I have tried all the options that I thought of:

 

_container animateDoor ["Door1",0,false];

_container animateDoor ["Door_1",0,false];

_container animateDoor ["Door_1_1",0,false];

 

no one seems to be working, so anyone know what exactly has to be done in order to close the doors?? (the disable works by the way)

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

If you disable the doors, you should already have the door names.

 

No really, the enabling/disabling of the door is done via "setVariable" command: 

_container setVariable["bis_disabled_Door_1",1,true]; //change the 1/0 to enable or disable the door.

For opening/closing doors, and after a lot of searching, I found this solution, in case anyone wants to use it:

[_Container, 'Door_1_rot', 'Door_Handle_1_rot_1', 'Door_Handle_1_rot_2'] execVM "\A3\Structures_F\scripts\Door_close.sqf";

As you see, this is done with the actual arma 3 code "\A3\Structures_F\scripts", and it works like a charm. Probably will be doable also just with animate command, and of course with those classes.

 

If anyone has a doubt feel free to ask.

Link to comment
Share on other sites

  • 0

Thankyou for the info!

_container setVariable ["bis_disabled_Door_1",1,true];

How i compose the string "bis_disabled_Door_1"?

The part "bis_disabled_" must be the same allways, but how i make sure what to use in the part "Door_1"?

It will be allways the same logic "Door_1", "Door_2", "Door_3", etc?

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...