Skip to content

Instantly share code, notes, and snippets.

@chz16
Last active October 8, 2019 04:09
Show Gist options
  • Save chz16/072ff3ff6a37c2b2df767acd3a4f05d6 to your computer and use it in GitHub Desktop.
Save chz16/072ff3ff6a37c2b2df767acd3a4f05d6 to your computer and use it in GitHub Desktop.
I Have No Mouth, And I Must Toggle Blocks On All Sides Of Me code
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title I Have No Mouth, And I Must Toggle Blocks On All Sides Of Me
author Corey Martin & Alan Hazelden, corrupted by CHz
run_rules_on_level_start
norepeat_action
========
OBJECTS
========
Background
#000000
00000
00000
00000
00000
00000
Target
#7a79db
.....
.....
.000.
.0.0.
.000.
Wall
#393875 #4f4e8d
00000
01000
11111
11111
00000
PlayerRight
#990c33 #ffffff #c83242 #cf5c50 black
.0000
.2121
22121
23333
.3..3
PlayerLeft
#990c33 #ffffff #c83242 #cf5c50 black
0000.
1212.
12122
33332
3..3.
(PlayerUp
#990c33 #ffffff #c83242 #cf5c50 black
.000.
.222.
22222
23332
.3.3.
PlayerDown
#990c33 #ffffff #c83242 #cf5c50 black
.000.
.121.
21212
23332
.3.3.)
Crate
#f99596 #7a41c7 #f08687 black
01310
03130
01310
00000
22222
CrateOnTarget
#7a79db
..0..
.0.0.
..0..
.....
.....
AboveCrate
#f99596
.....
.....
.....
.....
00000
BelowCrate
#f08687
00000
.....
.....
.....
.....
Decor1
#786d4f
.0...
.00..
..0..
..0..
..00.
Decor2
#786d4f
...0.
...0.
..00.
..0..
..0..
Decor3
#13694d #0f5c43
.0..0
010.1
.0100
.00.1
..00.
Decor4
#79dbb2
.....
.0...
.0.0.
..00.
.....
BelowWall
#444
00000
.....
.....
.....
.....
AboveWall
#93815f
.....
.....
.....
.....
00000
WallD
#93815f #444
.....
.....
.....
00000
11111
WallL
#93815f
0....
0....
0....
0....
0....
WallR
#93815f
....0
....0
....0
....0
....0
WallLR
#93815f
0...0
0...0
0...0
0...0
0...0
AboveWallL
#93815f
.....
.....
.....
0....
0....
AboveWallR
#93815f
.....
.....
.....
....0
....0
AboveWallLR
#93815f
.....
.....
.....
0...0
0...0
AboveWallLRwithR
#93815f
....0
....0
....0
0...0
0...0
AboveWallLRwithL
#93815f
0....
0....
0....
0...0
0...0
ToggleCrate
Transparent
=======
LEGEND
=======
. = Background
# = Wall
P = PlayerRight
* = Crate
@ = Crate and Target
O = Target
1 = Decor1
2 = Decor2
3 = Decor3
4 = Decor4
Player = PlayerRight or PlayerLeft (or PlayerUp or PlayerDown)
AboveDecoration = AboveWall or AboveWallL or AboveWallR or WallL or WallR or WallLR
=======
SOUNDS
=======
Player MOVE 19191107
Crate MOVE 19410707
Player action 25912309
Undo 34883507
Restart 29257109
(
EndLevel 44101909
)
endlevel 90138909
================
COLLISIONLAYERS
================
Background
BelowWall,BelowCrate
Target
Player, Wall, Crate
Decor1, Decor2, Decor3, Decor4, CrateOnTarget
AboveDecoration
WallD, AboveWallLR, AboveWallLRwithR, AboveWallLRwithL
AboveCrate
ToggleCrate
======
RULES
======
[ left Player ] -> [ left PlayerLeft ]
[ right Player ] -> [ right PlayerRight ]
([ up Player ] -> [ up PlayerUp ]
[ down Player ] -> [ down PlayerDown ])
[ action Player | no Wall ] -> [ action Player | ToggleCrate ]
[ ToggleCrate Crate ] -> [ ]
[ ToggleCrate ] -> [ Crate ]
[ > Player | Crate ] -> [ > Player | > Crate ]
[ > Crate | Crate ] -> [ > Crate | > Crate ]
(3D)
late [ AboveCrate ] -> []
late up [ Crate | ] -> [ Crate | AboveCrate ]
late [ BelowCrate ] -> []
late down [ Crate | ] -> [ Crate | BelowCrate ]
late [ CrateOnTarget ] -> []
late [ Crate Target ] -> [ Crate Target CrateOnTarget ]
down [ Wall | no Wall ] -> [ Wall WallD | BelowWall ]
up [ Wall | no Wall ] -> [ Wall | AboveWall ]
left [ Wall | no Wall ] -> [ Wall WallL | ]
right [ Wall WallL | no Wall ] -> [ Wall WallLR | ]
right [ Wall no AboveDecoration | no Wall ] -> [ Wall WallR | ]
up [ WallL | Wall no AboveDecoration ] -> [ WallL | Wall AboveWallL ]
up [ WallR | Wall no AboveDecoration ] -> [ WallR | Wall AboveWallR ]
up [ WallLR | Wall ] -> [ WallLR | Wall AboveWallLR ]
up [ WallL | Wall WallR ] -> [ WallL | Wall AboveWallLRwithR ]
up [ WallR | Wall WallL ] -> [ WallR | Wall AboveWallLRwithL ]
==============
WINCONDITIONS
==============
All Target on Crate
All Crate on Target
=======
LEVELS
=======
message Press X or Space to toggle blocks
.....................
........#####........
..2....#######....4..
....3..#o.p.o#.......
.......#.###.#.......
.4.....#.###.#.3.....
.....1.#.###.#.......
.....2.#o...o#.....3.
...3...#######.......
.....4....##......1..
.....................
...............
4..........2...
..3..#####...1.
...4.#ooo#.....
.....#opo#.....
.4...#ooo#..4..
...1.#####.....
...2...........
...........3...
..................
...............1.4
3..1...######..2..
.....###o#..#.....
.4...#o.....#.....
.....#.p##o.#...3.
...3.#o.....#.4...
.....###o#..#.....
.......######.....
..................
..................
...................
...................
4.....#######....3.
..2...#..p..#......
......#..#..#.....4
...4.##.o#o.#......
.....#...#..#....2.
.3...#o....o#..4...
...1.########......
................3..
..4.........1......
...................
..............4....
.2...............3.
....4.#######......
......#o.#.o#......
..3...#.o#o.#...1..
......#o.p.o#......
......#######......
...1...........4...
...2........3......
...................
.....................
...........#####.....
3....#######...#.....
...2.#o.o###o..#...3.
.4...#....p...o#.4...
.....#o.o###o..#.....
.....#######...#..1.4
...3.......#####..2..
.....................
.......3.......2...
4..................
..2.....###.....4..
.....####p####.....
...4.#..o.o..#.....
.3...#...#...#....4
.....#..o.o..#...3.
.....####o####.....
1.......###....4...
..4.............2..
....1.........3....
...................
...1...............
...2..#######..1...
4.....#..o..#....4.
......#.o.o.#......
....3.#o.p.o#.4....
......#.o.o.#....2.
...4..#..o..#......
......#######......
...................
.......4...........
.........4.....2.....
..2..............3...
4......#######.......
......##.#p#.##......
...3..#o..o..o#....4.
......#.#.#.#.#......
....4.#o..o..o#...3..
.3....#########......
................4....
..4.....1........2...
(......1..........
.............3..4
.2...#######.....
4....#.o.o.#.....
.....#o#o#o#.....
.....#.opo.#..4..
..3..#o#o#o#.....
...4.#.o.o.#....3
.....#######.....
...............2.
.3....4..2.......)
4......3...2..3....
..1..............4.
.....#########.....
2..4.#o.o#o.o#..2..
.3...#o.opo.o#..2..
.....#o.o#o.o#.4...
.....#########.....
..4.............3..
....1...4..3.......
message Sorry! :)
(...................
..1............4...
....3..#####.......
.......#o.o#....1..
.......#o..#....2..
...3...#..o#.......
....2..#o.p#..3....
.4.....#####.......
.............4.....
...................)
(#######
#ooooo#
#ooooo#
#oopoo#
#ooooo#
#ooooo#
#######)
(#########
#o.o#o.o#
#.p.o...#
#o.o#o.o#
#########)
(#########
#...#...#
#...o...#
##.###.##
#oo###oo#
##..#..##
##..p..##
##..#..##
#########)
(..######....
..#..p.#....
..#..#.#####
..#.o#o....#
###..#..o..#
#..o...###.#
#.###...o..#
#..o..#..###
#....o#o.#..
#####.#..#..
....#....#..
....######..)
(..#####..
..#.o.#..
###.#.###
#.p.o...#
#o#.#.#o#
#...o...#
###.#.###
..#.o.#..
..#####..)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment