Advertisement
Guest User

Untitled

a guest
Oct 28th, 2017
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. begin TR_act_m3_770_lant_script
  2.  
  3. float timer
  4. short sound
  5. ; global short TR_m3_OE_MainGate
  6.  
  7. if ( MenuMode )
  8. return
  9. endif
  10.  
  11. if ( TR_m3_OE_MainGMove )
  12. if ( sound )
  13. else
  14. set sound to 1
  15. PlayLoopSound3D "T_SndObj_ChainMechanism"
  16. endif
  17. elseif ( sound )
  18. set sound to 0
  19. StopSound "T_SndObj_ChainMechanism"
  20. endif
  21.  
  22. set timer to ( timer + GetSecondsPassed )
  23. ; rotate up
  24. if ( timer < 1 )
  25. Rotate x 2
  26. return
  27. ; rotate down
  28. elseif ( timer < 3 )
  29. Rotate x -2
  30. return
  31. ; up again
  32. elseif ( timer < 4 )
  33. Rotate x 2
  34. return
  35. endif
  36.  
  37. set timer to 0
  38. SetAtStart
  39.  
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement