increpare / PuzzleScript

Open Source HTML5 Puzzle Game Engine
MIT License
903 stars 160 forks source link

Game can crash if restart is triggered on level start #341

Closed ncrecc closed 7 years ago

ncrecc commented 8 years ago
title Simple Block Pushing Game
author Stephen Lavelle
homepage www.puzzlescript.net
run_rules_on_level_start

========
OBJECTS
========

Background
LIGHTGREEN GREEN
11111
01111
11101
11111
10111

Death
Purple
.....
.0.0.
..0..
.0.0.
.....

Wall
BROWN DARKBROWN
00010
11111
01000
11111
00010

Player
Black Orange White Blue
.000.
.111.
22222
.333.
.3.3.

DeadPerson
Black Red Lightred Darkred
.000.
.111.
22222
.333.
.3.3.

=======
LEGEND
=======

. = Background
# = Wall
P = Player
X = Death

=======
SOUNDS
=======

================
COLLISIONLAYERS
================

Background
Death
Player, Wall, Deadperson

======
RULES
======

[Death] -> restart
[Player Death] -> [DeadPerson Death]

==============
WINCONDITIONS
==============

=======
LEVELS
=======

####..
#.X#..
#..###
#.P..#
#....#
#..###
####..
increpare commented 8 years ago

haha, amusing catch :) thanks for the report!

increpare commented 8 years ago

note to self: easiest way to check on first turn might be to check if undo buffer is empty (unless it's just never written to if noundo is set)