The place to discuss the ADRIFT Interactive Fiction toolkit

Equation to Parse Text Override?

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.

Equation to Parse Text Override?

Postby IM6 » Thu Sep 14, 2017 10:37 pm

Hi - I hope I'm posting in the right area (and that this isn't already common knowledge elsewhere, but I feel I've searched fairly thoroughly and haven't found an answer):

I'm looking for a way to to parse text into its given text override (if one is assigned) in a way that I can assign the result to a variable. i.e. "[TEST EXPRESSION]" has Text Override "a test" - is there a function that could take "[TEST EXPRESSION]" and return "a test"? Ideally this would be able to be a part of a SET condition in an event i.e. SET testExprVar = OvrConvrt(%variable%)

I'm also interested in a check if a text string has a valid override (which is what I'll be attempting to do once the above is covered). My aim is to use a repeatable logic check to see if an overridden string starts with a "1" (is a set of options for a conversation) - if not, I'll know that the conversation path has reached its end and I ought to be able to flag a variable to end the conversation.

I just started using ADRIFT a bit ago and I'm still getting into it, so sorry if my knowledge is a little less advanced.
Posts: 1
Joined: Thu Sep 14, 2017 9:50 pm

Re: Equation to Parse Text Override?

Postby Campbell » Thu Apr 12, 2018 2:53 pm

You just need to include %text% in the task command. You will then be able to use Referenced Text in Restrictions and Actions, and use %text% in subsequent expressions.
ADRIFT Developer developer.
User avatar
Site Admin
Posts: 4620
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland

Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 8 guests