Making Hazards

169 views
Skip to first unread message

Shane Stenson

unread,
Apr 12, 2018, 11:46:07 AM4/12/18
to PuzzleScript
So hitting R during a puzzle will reset the room, but I'm trying to make hazards that kill the player/reset the room when they get hit. Does anyone know if there's a way to do that? Or failing that, is there some other way to create a hazardous object, maybe something that freezes the player so they can't move or anything else like that? Thanks in advance for any help you can lend.

Hugo

unread,
Apr 12, 2018, 11:58:18 AM4/12/18
to PuzzleScript
If you have undoing in your game, you can kill the player and let them undo. If not, you can have checkpoints, so the player resets to a not-so-far-back point in the game. If neither option is viable, you can teleport the player to a reset button upon "death", and change the player sprite to a selector on a reset button of sorts. Have the player locked there until they press the action key, then reset the level manually. Lastly, you can just reset the level by yourself manually a few moments after the player has died. I'm being deliberately vague about specific techniques because these vary drastically depending on what you're trying to achieve, and what type of game you're making.

Chris Pickel

unread,
Apr 12, 2018, 12:02:21 PM4/12/18
to Shane Stenson, PuzzleScript
The approach in Heroes of Sokoban II is basically:

[Corpse] -> restart
[Monster | Player] -> [Monster | Corpse]

The restart rule is first so that the corpse will be visible for one turn. After that, any keypress will trigger the restart rule. Try the game and see if it matches what you’re going for.

On Thu, Apr 12, 2018 at 5:46 PM Shane Stenson <sstens...@gmail.com> wrote:
So hitting R during a puzzle will reset the room, but I'm trying to make hazards that kill the player/reset the room when they get hit. Does anyone know if there's a way to do that? Or failing that, is there some other way to create a hazardous object, maybe something that freezes the player so they can't move or anything else like that? Thanks in advance for any help you can lend.

--
You received this message because you are subscribed to the Google Groups "PuzzleScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puzzlescript...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages