Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.49 KB | None | 0 0
  1. waitUntil {!isNull (findDisplay 46)};
  2.  
  3. findDisplay 46 displayAddEventHandler ["keyDown", {
  4.  
  5. _key = _this select 1; // Key Pressed
  6.  
  7.  
  8. // 24 = O for Oscar
  9. if (_key == 24) then {{
  10.  
  11. if ((_x animationPhase "Door_1_Move" == 0) OR (_x animationPhase "Door_1_Rot" == 0)) then {
  12.  
  13. _x animate ["Door_1_Move",1]; // Open gate
  14. _x animate ["Door_1_Rot",1]; // Open Bar Gate
  15.  
  16. } else {
  17.  
  18. hint "loser";
  19.  
  20. _x animate ["Door_1_Move",0]; // 0 = Closed
  21.  
  22. };
  23. } forEach nearestObjects [player,["All"],50];
  24. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement