Skip to content

Instantly share code, notes, and snippets.

@jcmiller11
Last active January 17, 2022 22:15
Show Gist options
  • Select an option

  • Save jcmiller11/156704f3f2a5b0eb500b86adfff5c15e to your computer and use it in GitHub Desktop.

Select an option

Save jcmiller11/156704f3f2a5b0eb500b86adfff5c15e to your computer and use it in GitHub Desktop.
Hookshot Thing (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Hookshot Thing
author jcGyo
homepage www.puzzlescript.net
again_interval 0.03
========
OBJECTS
========
Background
LIGHTGREEN GREEN
11111
01111
11101
11111
10111
Hole
Black
(Gotta do two death screen tiles to get that proper dither in 5x5)
Dead1
Red
.0.0.
0.0.0
.0.0.
0.0.0
.0.0.
Dead2
Red
0.0.0
.0.0.
0.0.0
.0.0.
0.0.0
Wall
BROWN DARKBROWN
00010
11111
01000
11111
00010
(HEY Remember me?? I'm the dude from Treasure Hunt)
PlayerU
darkgreen orange Brown White
.222.
12221
10001
.000.
.2.2.
PlayerD
darkgreen orange Brown White
.222.
13131
10001
.000.
.2.2.
PlayerL
darkgreen orange Brown White
.222.
.312.
.010.
.000.
..22.
PlayerR
darkgreen orange Brown White
.222.
.213.
.010.
.000.
.22..
Crate
Orange
00000
0...0
0...0
0...0
00000
HookR
grey
..0..
...0.
00000
...0.
..0..
HookL
grey
..0..
.0...
00000
.0...
..0..
HookU
grey
..0..
.000.
0.0.0
..0..
..0..
HookD
grey
..0..
..0..
0.0.0
.000.
..0..
LineH
grey
.....
.....
00000
.....
.....
LineV
grey
..0..
..0..
..0..
..0..
..0..
Goal
yellow
00000
00.00
0.0.0
00.00
00000
Puller
transparent
Level1
transparent
Once
transparent
=======
LEGEND
=======
. = Background
# = Wall
P = PlayerD
1 = PlayerD and Level1
* = Crate
O = Hole
@ = Goal
Dead = Dead1 or Dead2
Player = PlayerU or PlayerD or PlayerL or PlayerR
Hook = HookR or HookL or HookU or HookD
Line = LineH or LineV
=======
SOUNDS
=======
Crate MOVE 36772507
SFX0 34957907
SFX1 68550107
SFX2 42517108
================
COLLISIONLAYERS
================
Background
Hole, Goal
Player, Wall, Crate
Hook, Line
Dead, Puller
Level1
Once
======
RULES
======
(Flag to make some stuff happen once, replaces use of RANDOM)
[Player] -> [Player Once]
(Change player sprite direction)
[UP Player] -> [UP PlayerU]
[DOWN Player] -> [DOWN PlayerD]
[LEFT Player] -> [LEFT PlayerL]
[RIGHT Player] -> [RIGHT PlayerR]
(Destroy the HOOKS)
[Hook Wall] [Line] -> [Hook Wall] []
[Hook Wall] -> [Wall]
(Extend the HOOKS)
RIGHT [HookR|] [Once] -> [LineH|HookR] [] again SFX0
LEFT [HookL|] [Once] -> [LineH|HookL] [] again SFX0
UP [HookU|] [Once] -> [LineV|HookU] [] again SFX0
DOWN [HookD|] [Once] -> [LineV|HookD] [] again SFX0
(Deploy the HOOKS)
RIGHT [ACTION PlayerR|] -> [PlayerR|HookR] again SFX0
LEFT [ACTION PlayerL|] -> [PlayerL|HookL] again SFX0
UP [ACTION PlayerU|] -> [PlayerU|HookU] again SFX0
DOWN [ACTION PlayerD|] -> [PlayerD|HookD] again SFX0
(Catch the CRATES)
LATE [Hook Crate] -> [Crate]
(Pull the DUDE)
HORIZONTAL[LineH|Crate NO Hook] -> [LineH Puller|Crate] SFX1
VERTICAL [LineV|Crate NO Hook] -> [LineV Puller|Crate] SFX1
HORIZONTAL[LineH NO Puller|LineH Puller] -> [LineH Puller|LineH Puller]
VERTICAL [LineV NO Puller|LineV Puller] -> [LineV Puller|LineV Puller]
[Player|Puller Line] [Once] -> [|Player] [] again
(Push the CRATES)
[> Player|Crate|no Hole] -> [> Player|> Crate|]
(Stuff falls in the HOLES)
(LATE [Crate Hole] -> [Hole])
(Dumb hack to make you hookshot OVER the HOLES)
LATE RIGHT [PlayerR Hole|NO Line] [Background] -> [Hole|] [PlayerR Dead1]
LATE LEFT [PlayerL Hole|NO Line] [Background] -> [Hole|] [PlayerL Dead1]
LATE UP [PlayerU Hole|NO Line] [Background] -> [Hole|] [PlayerU Dead1]
LATE DOWN [PlayerD Hole|NO Line] [Background] -> [Hole|] [PlayerD Dead1]
(Only show the restart/undo message on the first level)
LATE [Player Dead1] [Level1] -> [Dead1] [] message Oops, you died, press Z to undo or R to restart
LATE [Player Dead1] -> [Dead1] SFX2
(Make the death screen)
LATE [Dead1|NO Dead] -> [Dead1|Dead1]
(Thanks to Chris Pickel, I took these lines straight from their game Mad Queens)
LATE RIGHT DOWN [Dead1|Dead1] -> [Dead1|Dead2]
LATE DOWN [Dead2|Dead2] -> [Dead2|Dead1]
(Break down temporary flags)
[Once] -> []
==============
WINCONDITIONS
==============
ALL Goal on Player
No Puller
=======
LEVELS
=======
#########
#*.@OO1.#
#########
#########
#..O....#
#.OOO.O.#
#.*...O.#
#.OOO.O@#
#.OOOOOO#
#P......#
#OOOO...#
#########
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment