Advertisement
Guest User

Untitled

a guest
Jul 18th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.74 KB | None | 0 0
  1. waitUntil {!isNull (findDisplay 46)};
  2.  
  3. findDisplay 46 displayAddEventHandler ["keyDown",
  4. {
  5.  
  6.     _key = _this select 1; // Key Pressed
  7.  
  8.  
  9.    // 24 = O for Oscar
  10.    if (_key == 24) then {
  11.  
  12.   {
  13.  
  14.        if ((_x animationPhase "Door_1_Rot") == 0) then
  15.         {
  16.  
  17.             _x animate ["Door_1_Rot",1]; // Open Bar Gate
  18.  
  19.         } else
  20.  
  21.         {
  22.  
  23.              _x animate ["Door_1_Rot",0]; // Close Bar Gate
  24.  
  25.         };
  26.  
  27.         if ((_x animationPhase "Door_1_Move") == 0) then
  28.         {
  29.  
  30.              _x animate ["Door_1_Move",1]; // Open Sliding Gate
  31.  
  32.         } else
  33.  
  34.         {
  35.  
  36.              _x animate ["Door_1_Move",0]; // Close Sliding Gate
  37.        
  38.         };
  39.      } forEach nearestObjects [player,["All"],50];
  40.   };
  41. }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement