Puzzlescript Rules

August 18, 2016

Replacing and Removing

rdp2

Water1 always becomes water2

[water1] -> [water2]

Sometimes fire1 becomes fire2

random [fire1] -> [fire2]

If player is on top of firstAidKit then firstAidKit disappears

[player firstAidKit] -> [player]

If player is next to firstAidKit then firstAidKit disappears

[player|firstAidKit] -> [player| ]

If fire is next to car then replace car with burntCar

[fire|car] -> [fire|burntCar]

If player is next to enemy then replace player with deadPlayer

[player|enemy] -> [deadPlayer|enemy]

If dead player then restart the game (NOTE: This rule should be at the top of the rules section so that the game waits a tick before restarting)

[deadPlayer] -> restart

If player is between two fires then replace player with deadPlayer

[fire|player|fire] -> [fire|deadPlayer|fire]

If man is on top of bluePortal and aligned with orangePortal, then man teleports to orangePortal

[man bluePortal|...|orangePortal] -> [bluePortal|...|man orangePortal]

portal

Pushing, Pulling, and Kicking

If player is next to chair and moves toward chair, then both move in that direction

[ > player|chair] -> [ > player| > chair]

If towTruck is next to car and moves away from car, then both move in that direction

[ < towTruck|car] -> [ < towTruck| < car]

If player is next to kickBall and moves toward kickBall, then only kickBall moves in that direction

[ > player|kickBall] -> [ player| > kickBall]

Bad Guy Movement

Zombie always moves in a random direction

[stationary zombie] -> [randomDir zombie]

If enemy is next to target, then it moves away from target

[enemy|target] -> [< enemy|target]

If player is aligned with badGuy, then badGuy moves toward player

[player|...|badGuy] -> [player|...| < badGuy]

The Action Button

If the action button (x) is pressed, then player is on top of seeds

[action player] -> [action player seeds]

If the action button (x) is pressed, then player is surrounded by seeds

[action player| ] -> [action player|seeds]

If the action button (x) is pressed and player is next to apple, then apple disappears

[action player|apple] -> [action player| ]

If the action button (x) is pressed and player one space away from one or more enemy, then they disappear

[action player| |enemy] -> [action player| | ]

If the action button (x) is pressed and player is aligned with (one or more) enemy, then they disappear

[action player|...|enemy] -> [action player|...| ]

The Shape-Shifting Player

wallbuilder1

If you put "player = man or boat" in the LEGEND section, you can have two or more sprites that represent the player. You can switch them like this:

If man is standing on top of dock next to water and moves toward the water, then man disappears and boat appears on water

[> man dock|water] -> [dock|boat water]

If boat is next to dock and moves toward it, then boat disappears and man appears on dock

[> boat|dock] -> [ |man dock]

Other Fun Stuff

If boat is next to NOT water and moves toward it, then cancel the turn

[> boat|no water] -> cancel

If deadPlayer exists then restart the level from beginning or from last checkpoint

[deadPlayer] -> restart

If player is on top of firstAidKit then firstAidKit disappears and a new checkpoint (restart location) is set

[player firstAidKit] -> [player] checkpoint

Use "late" if the order of rules is important to you. In this example case, the player would sometimes step on the firstAidKit and then the game would wait until the next turn to remove it and set the checkpoint. Using "late" ensures that the player moves and then it checks this rule.

After all other rules have been checked... if player is on top of firstAidKit then firstAidKit disappears and a new checkpoint is set

late [player firstAidKit] -> [player] checkpoint

Use "again" in order to make certain animations work. You will need to add an again_interval in the PRELUDE section (for example, again_interval 0.01).

After all other rules have been checked... if man is next to tornado then replace man with spinningMan1. Wait 0.01 seconds. spinningMan1 always becomes spinningMan2 and moves in a random direction. Wait 0.01 seconds. spinningMan2 always becomes spinningMan3 and moves in a random direction. Wait 0.01 seconds. spinningMan3 always becomes man and moves in a random direction.

late [man|tornado] -> [spinningMan1|tornado] again
[stationary spinningMan1] -> [randomDir spinningMan2] again
[stationary spinningMan2] -> [randomDir spinningMan3] again
[stationary spinningMan3] -> [randomDir man]

Make Some Noise

rotdp300w

In the SOUNDS sections, use these:

TitleScreen 5337906
ShowMessage 61224106
CloseMessage 1241234
Startlevel 22711100
EndLevel 88568102
Restart 123413
Undo 10987305
player Move 92275707
player CantMove 69279104
chair Move 41460507
badGuy Move 55946508
Sfx0 47352508
Sfx1 46769308

In the RULES section, you can use Sfx0 through Sfx9 like this:

If player steps on flower then flower disappears and play sound effect 0

[ player flower ] -> [player] Sfx0

If enemy is next to player then replace player with deadPlayer, put blood1 next to them, and play sound effect 1

[enemy|player| ] -> [enemy|deadPlayer|blood1] Sfx1

Playing background music from YouTube USED to be supported, but no longer works. Here is the error message that you will get if you try: "Unfortunately, YouTube support hasn't been working properly for a long time - it was always a hack and it hasn't gotten less hacky over time, so I can no longer pretend to support it."

In the PRELUDE section, you can loop the music from a YouTube video as the soundtrack for your game. NOTE: This does not work in the Puzzlescript editor or on iOS devices.

Play the sound from this YouTube video http://www.youtube.com/watch?v=c2K_siojQNI

youtube c2K_siojQNI



makey_line_drawingThis video shows 4th, 5th, and 6th grade students' homemade video game controllers. Students learned about the basics of electronics and then designed a schematic that incorporated closed and open circuits. Next, they worked on Scratch games to keep track of points. Finally, they built switches that would complete circuits when connected to the Makey Makey.




RECENT POSTS