Log In  

Cart #11304 | 2015-06-16 | Embed ▽ | No License

So according to a thread I read five seconds ago, Lua script is coming soon. BUT WHAT IF IT ISN'T SOON ENOUGH?!?! (Or maybe that wasn't what I read.)

Anyway, here is a way to add simple logic in Voxatron levels, within a single object, (ab)using the Priority and Modifier mechanics.

The first demo shows how Priority works. Each rectangle represents a triggerable object (such as an animation or a modifier). The white objects have their duration set to 5, and the black objects have their duration set to 0 (indefinite). They each have their priority written on them. When you activate one, it 'shadows' all of the ones beneath it, preventing them from activating or activating the one set as 'next'. The indefinite ones can still be turned off by activating a higher priority one. This can be used to create things like S/R latches.

By the way, the diagram is one object. It receives input from the buttons via IS:OBJ_ID:##:M_STATE:SHOT.

Next is a demo of Modifiers, represented by hollow rectangles. Like normal objects, they can be forced off by shadowing them. They will also disable all of their children while they are disabled. The red object's trigger is set to PARENT:ACTIVE, so it will always be active while the modifier is. You can use this to shadow other objects or have multiple 'next' objects for one modifier. The children also won't send or receive 'next' triggers while their parent is disabled, as shown with the one at the bottom.

Using these, you can build complicated networks, like the one for this passcode door. Here's how it works:

  • The object at the top resets the lock using three children (not pictured) that are set to IS:PARENT:TIME = 1, so that they'll activate once, setting the state triggers appropriately.

  • One object, unlike the others, is not set to reset on activation. It will only activate once, triggering the reset object to initialize the lock. (also not pictured)

  • The state triggers at the right are S/R latches that each have their own group. When active, they shadow the button triggers so that they don't activate erroneously.

  • The buttons each trigger 3 objects, 2 of which are shadowed. The unshadowed one determines the action that will be performed: Either activating the next row, or resetting the lock.

  • When the last trigger is activated, it will disable the lock, play a sound, and use an animation to clear a hole in the wall.

And that's how you make mechanisms out of the bits and bobs lying around in Voxatron! Maybe, to prove that it is Turing-Complete, I'll build.. A TURING MACHINE! Wish me luck...

P#11305 2015-06-16 16:41 ( Edited 2015-06-16 21:05)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-13 11:50:37 | 0.008s | Q:11