Advertisement
Guest User

Untitled

a guest
Sep 20th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. @name Multi Floor Elevator
  2. @inputs Up Down Zero
  3. @outputs Floor Height SmoothRate
  4. @persist
  5. @trigger
  6.  
  7. StartHeight = 33 # Height of Floor 0
  8. FloorHeight = 200 # Height of Each Floor
  9. SmoothRate = 65 # Speed of Elevator (recommended 50 - 80)
  10.  
  11. if(Up == 1){ # Makes the Elevator go Up if Up is pressed
  12. Floor+=1
  13. }
  14.  
  15. if(Down == 1){ # Makes the Elevator go Down if Down is pressed
  16. Floor-=1
  17. }
  18. if(Zero == 1){
  19. Floor-= Floor
  20. }
  21.  
  22. if(Floor == 0){ # If Floor = 0 it will have StartHeight as Value
  23. Height = StartHeight
  24. }
  25.  
  26. if(Floor > 0){ # Floor*FloorHeight is the Height!!
  27. Height = Floor * FloorHeight
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement