Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Lcast's Light Alternator
- @inputs ON OFF
- @outputs Blue:vector Red:vector
- @persist I IDLE Active
- runOnChat(1)
- C = owner():lastSaid():explode(" ")
- #Button Stuff
- if(ON){
- IDLE = 1
- }
- if(OFF){
- IDLE = 0
- }
- #Chat Command Stuff
- if(chatClk(owner()))
- {
- if(C[1,string]=="-siron")
- {
- hideChat(1)
- IDLE = 1
- }elseif(C[1,string]=="-siroff")
- {
- hideChat(1)
- IDLE = 0
- Blue=vec(0)
- Red=vec(0)
- }
- }
- #What makes the lights alternate
- if(IDLE==1){
- if(I==1){
- IDLE = 1
- Red = vec(255,0,0)
- Blue = vec(0)
- I=0
- }else{
- IDLE = 1
- Red = vec(0)
- Blue = vec(0,0,255)
- I=1
- }
- interval(500) #this affects the blink rate
- }
- if(IDLE==0){
- Red = vec(0)
- Blue = vec(0)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement