ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Text Input without Popups

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.

Text Input without Popups

Postby The0didactus » Wed Sep 18, 2019 9:17 pm

I hope there's an easy answer here.

Long story short, the only thing preventing us from getting Skybreak in an online-playable state are two popup windows at the beginning of the game. These windows, purely for "flavor" reasons, prompt the player to name their character and their ship. obviously I could just do away with both...but I'd really prefer not to.

Is there any way to set text-string variables in ADRIFT to player-submitted text without the use of a popup window?

Any help would be appreciated.
The0didactus
 
Posts: 236
Joined: Sun Mar 30, 2014 8:20 pm
Points: 80

Re: Text Input without Popups

Postby Lumin » Wed Sep 18, 2019 9:19 pm

Ooh, ooh! I've got this one!

Just let me get to my computer and remind myself how.
User avatar
Lumin
 
Posts: 2024
Joined: Fri Aug 06, 2004 5:48 pm
Points: 34

Re: Text Input without Popups

Postby Lumin » Wed Sep 18, 2019 10:03 pm

That was easy! ^_^

I left it on the discord.
User avatar
Lumin
 
Posts: 2024
Joined: Fri Aug 06, 2004 5:48 pm
Points: 34

Re: Text Input without Popups

Postby R2T1 » Thu Sep 19, 2019 3:04 am

Care to share it here too?
User avatar
R2T1
 
Posts: 117
Joined: Thu Dec 20, 2012 10:41 am
Location: Sydney, Australia
Points: 13

Re: Text Input without Popups

Postby Lumin » Thu Sep 19, 2019 12:47 pm

This is a question that separates those who have read the manual from those who have not.

Image

Image

All you need is a blank text variable called 'name', and whichever restrictions to make sure the task only works when prompted and only works once. (Since %text% is a catch all, if it's not disabled after, anything the player types from then on will be set as the name.)

The PCASE() isn't necessary, but it sets the first letter to be capitalized. You can also use UCASE for all caps, or just use %text% by itself.
User avatar
Lumin
 
Posts: 2024
Joined: Fri Aug 06, 2004 5:48 pm
Points: 34

Re: Text Input without Popups

Postby The0didactus » Thu Sep 19, 2019 1:13 pm

I've still never read the manual :yeah:


I think it was...6 months ago when I first realized you could copy and past restrictions and actions in commands. That was a huge timesaver.

This is nice too. As a heads up everyone: the solution we have for online play does not support popup windows, so you will have to use this method for having player-entered character names and such.
The0didactus
 
Posts: 236
Joined: Sun Mar 30, 2014 8:20 pm
Points: 80

Re: Text Input without Popups

Postby Lumin » Thu Sep 19, 2019 8:18 pm

Didn't you also just delete the entire library and redo it for Tingalan, rather than learn to do text overrides?
User avatar
Lumin
 
Posts: 2024
Joined: Fri Aug 06, 2004 5:48 pm
Points: 34


Return to ADRIFT 5.0

Who is online

Users browsing this forum: Google [Bot] and 2 guests