ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Which Button? multiple buttons question

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.

Which Button? multiple buttons question

Postby ParadoxGames » Tue Apr 19, 2016 5:23 am

Hi. I have an elevator in my game.

There are three floors: floors 4, 5, and 6. Each floor has a location called Floor X Elevator Shaft.

There's a static object called ELEVATOR BUTTON, a single button located at multiple locations: the elevator shaft for each floor. (The multiple locations are called "Elevator shafts".)

Inside the elevator are three buttons: a 4 BUTTON, a 5 BUTTON and a 6 BUTTON.

I've been successful with using restrictions to make sure the elevator button isn't visible when you're inside the elevator, and the floor buttons aren't visible when you're outside the elevator. But if a player says, PUSH BUTTON without specifying, the game will ask, "which button do you want to push, the elevator button, the 4 button, the 5 button, or the 6 button."

Is there a way to get the program to automatically press the elevator button if outside the elevator, and only ask, "which button do you want to push: the 4 button, the 5 button or the 6 button", when inside the elevator, ignoring the ELEVATOR BUTTON.

I think I may have a solution. I'll try it, but may still need help.
ParadoxGames
 
Posts: 161
Joined: Sat Sep 05, 2015 2:33 am
Points: 10

Re: Which Button? multiple buttons question

Postby Lazzah » Tue Apr 19, 2016 9:06 am

ParadoxGames wrote:Hi. I have an elevator in my game.

There are three floors: floors 4, 5, and 6. Each floor has a location called Floor X Elevator Shaft.

There's a static object called ELEVATOR BUTTON, a single button located at multiple locations: the elevator shaft for each floor. (The multiple locations are called "Elevator shafts".)

Inside the elevator are three buttons: a 4 BUTTON, a 5 BUTTON and a 6 BUTTON.

I've been successful with using restrictions to make sure the elevator button isn't visible when you're inside the elevator, and the floor buttons aren't visible when you're outside the elevator. But if a player says, PUSH BUTTON without specifying, the game will ask, "which button do you want to push, the elevator button, the 4 button, the 5 button, or the 6 button."

Is there a way to get the program to automatically press the elevator button if outside the elevator, and only ask, "which button do you want to push: the 4 button, the 5 button or the 6 button", when inside the elevator, ignoring the ELEVATOR BUTTON.

I think I may have a solution. I'll try it, but may still need help.

It would be a great help if you were to attach your game file to your post so we can have a look and see what is wrong.
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2103
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17

Re: Which Button? multiple buttons question

Postby ParadoxGames » Wed Apr 20, 2016 8:27 pm

Actually, I took a rest and returned to it later. I was overcomplicating the problem. After returning with a fresh look, I found my solution on my own. I playtested the elevator very heavily after that, even thinking weird, and it is working smoothly.
ParadoxGames
 
Posts: 161
Joined: Sat Sep 05, 2015 2:33 am
Points: 10

Re: Which Button? multiple buttons question

Postby ElliotM » Wed Apr 20, 2016 9:37 pm

Glad you found a solution, but like Lazzah said, if you'd like help from others please remember to attach sample files when you post technical questions. :)
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Which Button? multiple buttons question

Postby ParadoxGames » Thu Apr 21, 2016 8:00 pm

/i understnad how helpful doing that is, but I didn't want to post my whole game up.
ParadoxGames
 
Posts: 161
Joined: Sat Sep 05, 2015 2:33 am
Points: 10

Re: Which Button? multiple buttons question

Postby ElliotM » Thu Apr 21, 2016 9:07 pm

I respect that you don't want to upload your whole game but that isn't what we are talking about when we say sample files are helpful. A sample should be just enough of your game in a different file to show what you have questions about or want feedback on and nothing more. For your question about the elevator, a sample should really only contain the elevator system and enough locations to test whether it worked properly. Unless you can't replicate an issue in a different file, we don't really need to see your whole game to answer a question.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 2 guests

cron