gateController.sqf 984 B

12345678910111213141516171819202122232425
  1. _this setvariable ["gateToOpen1",Main_Gate_Front_1,true];
  2. _this setvariable ["gateToOpen2",Main_Gate_Front_2,true];
  3. _this setvariable ["gateToOpen3",Main_Gate_Front_1,true];
  4. _this setvariable ["gateToOpen4",Main_Gate_Front_2,true];
  5. _this addAction ["<t color='#00FF00'>Open Gate</t>",
  6. {
  7. (_this select 0) getvariable "gateToOpen1" animateSource ["gate_door_1",1,3];
  8. (_this select 0) getvariable "gateToOpen2" animateSource ["gate_door_1",1,3];
  9. (_this select 0) getvariable "gateToOpen3" animateSource ["gate_door_2",1,3];
  10. (_this select 0) getvariable "gateToOpen4" animateSource ["gate_door_2",1,3];
  11. }
  12. ];
  13. _this addAction ["<t color='#00FF00'>Close Gate</t>",
  14. {
  15. (_this select 0) getvariable "gateToOpen1" animateSource ["gate_door_1",0,3];
  16. (_this select 0) getvariable "gateToOpen2" animateSource ["gate_door_1",0,3];
  17. (_this select 0) getvariable "gateToOpen3" animateSource ["gate_door_2",0,3];
  18. (_this select 0) getvariable "gateToOpen4" animateSource ["gate_door_2",0,3];
  19. }
  20. ];