I've been playing around with scripting and I think I have the basics down. So... I've been working on a traffic light for the last 4 days and can't get it right. The current setup on the map has a script test-bed outside of the play area to trigger events and send signals to play-area objects. I have four simple 2x2x2 blocks that act as timed triggers: first block has a respawn time of 0 second block has a respawn of 10 third block has a respawn time of 12 fourth block has a respawn time of 22 The traffic light cycle is initialized by a Switch/keypad. (This will soon change to "On Match: Start" when it finally sequences correctly) When the switch is interacted with, it send a message to despawn all four of the 2x2x2 blocks at the same time. The 2x2x2 blocks spawn in the correct order every single time. (10 Seconds, 2 seconds, 10 seconds... repeat...) When each block spawns, it sends a message to the appropriate traffic light color. The traffic light is just a block with three black soda cans. Each soda can is assigned it's own receiving channel. First block triggers the green-light soda can to turn on... change from black to green. Second block triggers green soda can to turn off, and yellow soda can to turn on. Third block triggers yellow to turn off and red to turn on. Fourth block triggers red to turn off and despawn all 2x2x2 blocks to repeat the trigger cycle. The problem is when the color changes from green to yellow, it skips yellow and goes directly to red. I'm absolutely stumped about what is going on with the script. I've saved the map and restarted. I've built this on a fresh canvas with similar unpredictable behavior. What am I doing wrong?
Please add me and message me I will help but quite frankly its hard to work on these things based off a description, I have a way of scripting these types of events I just need to see what you want.
I just got this working glitch-free using the power:set instead of message:send. I'm limited to assigning 7 scripts to each 2x2x2 box... which makes it more complicated than it should be.
Watch out with using signals to spawn items onto the map that you later want to have despawn. I can't tell if it is affecting you based on your description but here is the bug which Tom French has told me he filed. If you spawn and item in with a scripted message or channel toggle, the item no longer despawns based on its set despawn timer. It will just remain on the map forever or until you tell it to despawn by using another script.
I'm online now. Typically I am online after 7PM Eastern time (New York City) on weekdays Monday through Thursday. Weekends I am hit or miss. I was not aware of this bug! Thanks for the tip! I had other plans unrelated to the traffic light to utilize the timed despawn setting for objects that run scripts too.