Skip to content

Instantly share code, notes, and snippets.

@RoseAndres
Created June 12, 2023 21:13
Show Gist options
  • Save RoseAndres/d6608b47861c632ed2cb625a786c5753 to your computer and use it in GitHub Desktop.
Save RoseAndres/d6608b47861c632ed2cb625a786c5753 to your computer and use it in GitHub Desktop.
Core Exodus (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Core Exodus
author Dre Rose
homepage https://github.com/RoseAndres
norepeat_action
========
OBJECTS
========
Background
lightgray
Wall
lightgray darkbrown
11111
11111
11011
11111
11111
PlayerHollow
darkgray lightgray
.000.
00100
01110
00100
.000.
Void
darkgray black
00000
01110
01110
01110
00000
PlayerPulling
orange lightgray
.000.
00100
01110
00100
.000.
PlayerRed
lightred red darkgray
.222.
22022
20102
22022
.222.
PlayerRedEjecting
orange red lightred
.000.
00200
02120
00200
.000.
PlayerBlue
lightblue blue darkgray
.222.
22022
20102
22022
.222.
PlayerBlueEjecting
orange blue lightblue
.000.
00200
02120
00200
.000.
PlayerGreen
lightgreen green darkgray
.222.
22022
20102
22022
.222.
PlayerGreenEjecting
orange green lightgreen
.000.
00200
02120
00200
.000.
ButtonRed
gray red lightred
.....
.111.
.121.
.111.
.....
CoreRed
red
.....
..0..
.000.
..0..
.....
CoreRedSlotEmpty
red gray
00000
00100
01110
00100
00000
CoreRedSlotFilled
gray lightred
00000
00100
01010
00100
00000
ButtonBlue
blue lightblue
.....
.000.
.010.
.000.
.....
CoreBlue
blue
.....
..0..
.000.
..0..
.....
CoreBlueSlotEmpty
blue gray
00000
00100
01110
00100
00000
CoreBlueSlotFilled
gray lightblue
00000
00100
01010
00100
00000
ButtonGreen
green lightgreen
.....
.000.
.010.
.000.
.....
CoreGreen
green
.....
..0..
.000.
..0..
.....
CoreGreenSlotEmpty
green gray
00000
00100
01110
00100
00000
CoreGreenSlotFilled
gray lightgreen
00000
00100
01010
00100
00000
Sign1
orange
..0..
..0..
..0..
.....
..0..
Sign2
orange
..0..
..0..
..0..
.....
..0..
CellRed
red
CellBlue
blue
CellGreen
green
=======
LEGEND
=======
. = Background
# = Wall
/ = Void
O = PlayerHollow
A = PlayerRed
B = PlayerBlue
C = PlayerGreen
G = ButtonRed
H = ButtonBlue
I = ButtonGreen
J = CellRed
K = CellBlue
L = CellGreen
T = CoreRedSlotEmpty
U = CoreBlueSlotEmpty
W = CoreGreenSlotEmpty
X = CoreRed
Y = CoreBlue
Z = CoreGreen
1 = Sign1
2 = Sign2
Player = PlayerRed or PlayerBlue or PlayerGreen or PlayerHollow or PlayerRedEjecting or PlayerBlueEjecting or PlayerGreenEjecting or PlayerPulling
PlayerEjecting = PlayerRedEjecting or PlayerGreenEjecting or PlayerBlueEjecting
Button = ButtonRed or ButtonBlue or ButtonGreen
Core = CoreRed or CoreBlue or CoreGreen
Cell = CellRed or CellBlue or CellGreen
Sign = Sign1 or Sign2
SlotEmpty = CoreRedSlotEmpty or CoreBlueSlotEmpty or CoreGreenSlotEmpty
SlotFilled = CoreRedSlotFilled or CoreBlueSlotFilled or CoreGreenSlotFilled
=======
SOUNDS
=======
sfx0 61765506 (picking up a core)
sfx1 58011502 (putting down core)
sfx2 65085706 (moving)
showmessage 78677705
closemessage 9137501
Player move 48617106
Player cantmove 65085706
PlayerEjecting create 35568905
PlayerEjecting destroy 53997501
endlevel 13968902
================
COLLISIONLAYERS
================
Background
Void
SlotFilled, SlotEmpty
Core
Button
Player, Wall, Cell, Sign
======
RULES
======
[ > Player | Void ] -> restart
[ > Player | Sign1 ] -> message While holding a core, press the action button to enter EJECT mode, then press the direction you'd like to eject your core to!
[ > Player | Sign2 ] -> message Whenever no core is held, pressing the action button will enter MAGNET mode. Moving while in this mode will pull blocks parallel to your direction of travel.
[ > PlayerRedEjecting | NO Wall ]-> [ PlayerHollow | CoreRed ] sfx1
+ [ > PlayerBlueEjecting | NO Wall ]-> [ PlayerHollow | CoreBlue ] sfx1
+ [ > PlayerGreenEjecting | NO Wall ]-> [ PlayerHollow | CoreGreen ] sfx1
[ > Player | SlotEmpty ] -> [ Player | SlotEmpty ]
[ CoreGreen CoreGreenSlotEmpty ] -> [ CoreGreenSlotFilled ]
[ CoreBlue CoreBlueSlotEmpty ] -> [ CoreBlueSlotFilled ]
[ CoreRed CoreRedSlotEmpty ] -> [ CoreRedSlotFilled ]
late [ CoreRed CellRed ] -> []
+ late [ CoreBlue CellBlue ] -> []
+ late [ CoreGreen CellGreen ] -> []
late [ PlayerHollow CoreRed ] -> [ PlayerRed ] sfx0
+ late [ PlayerHollow CoreBlue ] -> [ PlayerBlue ] sfx0
+ late[ PlayerHollow CoreGreen ] -> [ PlayerGreen ] sfx0
[ > PlayerRed | CoreRed ] -> [ | PlayerRed ] sfx0
+ [ > PlayerBlue | CoreRed ] -> [ CoreBlue | PlayerRed ] sfx0
+ [ > PlayerGreen | CoreRed ] -> [ CoreGreen | PlayerRed ] sfx0
[ > PlayerRed | CoreBlue ] -> [ CoreRed | PlayerBlue ] sfx0
+ [ > PlayerBlue | CoreBlue ] -> [ | PlayerBlue ] sfx0
+ [ > PlayerGreen | CoreBlue ] -> [ CoreGreen | PlayerBlue ] sfx0
[ > PlayerRed | CoreGreen ] -> [ CoreRed | PlayerGreen ] sfx0
+ [ > PlayerBlue | CoreGreen ] -> [ CoreBlue | PlayerGreen ] sfx0
+ [ > PlayerGreen | CoreGreen ] -> [ | PlayerGreen ] sfx0
[ > PlayerRed | CellRed ] -> [ > PlayerRed | > CellRed ]
+ [ > PlayerBlue | CellBlue ] -> [ > PlayerBlue | > CellBlue ]
+ [ > PlayerGreen | CellGreen ] -> [ > PlayerGreen | > CellGreen ]
[ < PlayerPulling | Cell ] -> [ < PlayerPulling | < Cell ]
[ action PlayerRed ] -> [ PlayerRedEjecting ]
+ [ action PlayerBlue ] -> [ PlayerBlueEjecting ]
+ [ action PlayerGreen ] -> [ PlayerGreenEjecting ]
[ action PlayerRedEjecting ] -> [ PlayerRed ]
+ [ action PlayerBlueEjecting ] -> [ PlayerBlue ]
+ [ action PlayerGreenEjecting ] -> [ PlayerGreen ]
[ action PlayerHollow ] -> [ PlayerPulling ]
[ action PlayerPulling ] -> [ PlayerHollow ]
[ CoreGreen CoreGreenSlotEmpty ] -> [ CoreGreenSlotFilled ]
[ CoreRed CoreRedSlotEmpty ] -> [ CoreRedSlotFilled ]
[ CoreBlue CoreBlueSlotEmpty ] -> [ CoreBlueSlotFilled ]
==============
WINCONDITIONS
==============
ALL ButtonRed ON CellRed
ALL ButtonBlue ON CellBlue
ALL ButtonGreen ON CellGreen
=======
LEVELS
=======
(
(put the box on the button)
##########
#...######
#.A..J..G#
#...######
##########
(all buttons must have boxes)
##########
#....J..G#
#.A.######
#....J..G#
##########
(picking up a core allows you to push same colored boxes)
##########
#...######
#XO..J..G#
#...######
##########
(walking into a core while holding one will automatically pick up the new one and drop the old one in the previous space)
##########
#....J..G#
#YA.######
#....K..H#
##########
(action while holding a core will allow you to eject it in any direction)
##########
#...######
#1OXYJ..G#
#...######
##########
##########
#..X.....#
#..####..#
#OJKGH...#
#..####..#
#..Y.....#
##########
##########
#..X.....#
#..####..#
#OJKGH...#
#..####..#
#..Y.....#
##########
(action while hollow enters magnet mode and will pull blocks with you when you move, if the block is parallel to your direction of travel)
##########
#...#X#..#
#.G.KOJH.#
#...#Y#.2#
##########
)
#######
#kh.#g#
#..#2j#
#.a...#
#######
#######
#...#g#
#.#.#j#
#a.k..#
#######
#######
#...#j#
#.#.#g#
#a.k..#
#######
#######
#h#y###
#...#j#
#.#.#g#
#a.k..#
#######
#########
#k..k.#.#
#.##hagj#
#h....#y#
#########
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment