[Wall1] -> [Wall2]
[Wall2] -> [Wall3]
[Wall3] -> [Wall4]
[Wall4] -> [Wall5]
[Wall5] -> [Wall1]
However, when we run the code (and move around a bit if it's not in real time), nothing happens. That's because the parser, naturally, doesn't care about whether or not the wall objects were already there, or were just transformed into them. We could try turning them into unrelated objects and back to avert this:
[Wall1] -> [Temp2]
[Wall2] -> [Temp3]
[Wall3] -> [Temp4]
[Wall4] -> [Temp5]
[Wall5] -> [Temp1]
[Temp1] -> [Wall1]
[Temp2] -> [Wall2]
[Temp3] -> [Wall3]
[Temp4] -> [Wall4]
[Temp5] -> [Wall5]
But that can cram up the Rules and Objects list quickly if we have more frames, or if there's multiple animated objects. So what if we could just prevent an object from changing into another for an entire turn, with a simple command? It could be inserted before the object, like directions are:
[Wall1] -> [nochange Wall2]
[Wall2] -> [nochange Wall3]
[Wall3] -> [nochange Wall4]
[Wall4] -> [nochange Wall5]
[Wall5] -> [nochange Wall1]
And simply negate any rules where said object is replaced by any another object, including a blank space. For more specific cases, there could also be noMove (do not let this object move for this turn), noTouch (do not let this object move or change for this turn), and maybe even yesChange/yesMove/yesTouch (to, well, negate the negation). And it doesn't have to be used for just animations, either. This repetitive mess of code ( http://www.puzzlescript.net/play.html?p=8a4d08484adeb28ddede1510a80e12d3 ):
late [PlayerB PortalB] [PortalO] -> [PortalB] [PortalO TeleTokenB]
late [PlayerO PortalB] [PortalO] -> [PortalB] [PortalO TeleTokenO]
late [PlayerG PortalB] [PortalO] -> [PortalB] [PortalO TeleTokenG]
late [PlayerB PortalO] [PortalG] -> [PortalO] [PortalG TeleTokenB]
late [PlayerO PortalO] [PortalG] -> [PortalO] [PortalG TeleTokenO]
late [PlayerG PortalO] [PortalG] -> [PortalO] [PortalG TeleTokenG]
late [PlayerB PortalG] [PortalB] -> [PortalG] [PortalB TeleTokenB]
late [PlayerO PortalG] [PortalB] -> [PortalG] [PortalB TeleTokenO]
late [PlayerG PortalG] [PortalB] -> [PortalG] [PortalB TeleTokenG]
late [TeleTokenB] -> [PlayerB]
late [TeleTokenO] -> [PlayerO]
late [TeleTokenG] -> [PlayerG]
can be miraculously changed to:
late [Player PortalB] [PortalO] -> [PortalB] [PortalO nochange Player]
late [Player PortalO] [PortalG] -> [PortalO] [PortalG nochange Player]
late [Player PortalG] [PortalB] -> [PortalG] [PortalB nochange Player]
--
You received this message because you are subscribed to the Google Groups "PuzzleScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puzzlescript...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.