Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name MultiFloor elevator for Bion by iNvalid
- @inputs F1A F1B F2A F2B F3A F3B Hyd
- @outputs H
- @persist H1 H2 H3 Height
- @trigger
- if(first())
- {
- H = 0
- H1 = 0
- H2 = 100
- H3 = 200
- hint("made by iNvalid",5)
- print("commands to change height of floors")
- print("!f1 [height]")
- print("!f2 [height]")
- print("!f3 [height]")
- }
- S = owner():lastSaid():explode(" ")
- if(S[1,string] == "!f1")
- {
- H1 = S[2,string]:toNumber()
- }
- if(S[1,string] == "!f2")
- {
- H2 = S[2,string]:toNumber()
- }
- if(S[1,string] == "!f3")
- {
- H3 = S[2,string]:toNumber()
- }
- if(F1A || F1B)
- {
- Height = H1
- }
- if(F2A || F2B)
- {
- Height = H2
- }
- if(F3A || F3B)
- {
- Height = H3
- }
- timer("go",10)
- if(clk("go"))
- {
- if(Hyd>Height)
- {
- H = H - 1
- }
- if(Hyd<Height)
- {
- H = H - 1
- }
- }
Add Comment
Please, Sign In to add comment