The place to discuss the ADRIFT Interactive Fiction toolkit

Creating a puzzle with a time limit

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Creating a puzzle with a time limit

Postby Bobinator » Sat Nov 26, 2016 6:04 pm

So I've been working on making a short test game, and I have a question on how to handle something in particular. Basically, the idea is you have a bomb that's going to go off, and you have to put it in a safe and close it, before it explodes. That's it. I did say it was a test game. :P

So, here's how I set it up.

- We have a bomb, with the property of "Deadly" or "Not Deadly". It is in the same room as the player, and it is set to 'deadly'. To make it "not deadly", it must be inside the container called "a safe", and that container must be closed. We have a task called "Make Bomb Safe" that runs immediately, with the restrictions of what was listed above.
- Event "Bomb Countdown" runs as soon as play begins. It lasts 5 turns. It has sub events for visibly counting down for the player. As shown here:
- "Bomb Explodes" is what kills the player, with the restriction that the bomb must be "deadly". "Bomb Explodes Safely" is what destroys the bomb if it is safely contained.
- We also have a one turn event that repeats every turn, called "Check Bomb Safety". Every turn from the start of this events, it attempts to run "Make Bomb Safe", keeping in mind the restrictions we placed.
- So, at the end of the countdown, the task "Bomb Explodes" runs, but only if the bomb IS set to Deadly. If that fails for any reason, the event "Bomb Explodes Safely" happens instead.

Is this the right away to do it, or am I missing something a lot simpler? Thank you.
Posts: 4
Joined: Fri Jan 22, 2016 9:13 pm

Re: Creating a puzzle with a time limit

Postby ralphmerridew » Sat Nov 26, 2016 6:17 pm

Question: How would your implementation handle the case of putting the bomb in the safe, closing the safe, then reopening the safe, before the bomb explodes?

Also, if the player correctly has the bomb in the closed safe, but some other objects are also in the safe? What happens to them? (Removed from play? Switched to "damaged" form?")

Suppose the player puts the bomb in some container, then puts that container in the safe, and closes the safe. Will that be correctly handled?

I'd say remove the "Deadly / Not Deadly" property and the "Make Bomb Safe" and "Check Bomb Safety" tasks. Have the "Bomb Explodes" task set off the "Bomb Explodes Safely" (which checks the conditions from "Make Bomb Safe"), and "Bomb Explodes Deadly" (which has condition that "Bomb Explodes Safely" was not run.)
Bloodhounds can make you laugh and cuss in the same breath. They are endearing, faithful, and can sling drool ten feet in any direction. -- Virginia Lanier
User avatar
Posts: 2558
Joined: Fri Dec 13, 2002 11:56 pm
Location: Missouri
Points: 10

Re: Creating a puzzle with a time limit

Postby ParadoxGames » Wed Nov 30, 2016 10:37 pm

cool idea, and cool to consider the effects of the bomb on objects or characters in the same room or object!
Posts: 161
Joined: Sat Sep 05, 2015 2:33 am
Points: 10

Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 5 guests