ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Event controls?

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.

Event controls?

Postby P/o Prune » Wed Apr 25, 2018 10:26 am

Is there a way I can have an event started by the value of a variable rather than a task?
I have two tasks that needs to be completed before the event should kick in, but as I see it, it's only possible to assign one task.

Suggestions will be immensely appreciated. :thanks:
D-Day V.5 in progress 86Kb (Slowly drifting)
Anno 1700 Submitted to the 2018 IFComp.
User avatar
P/o Prune
Site Admin
 
Posts: 4212
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 43

Re: Event controls?

Postby ElliotM » Wed Apr 25, 2018 12:52 pm

One option would be to create a third task which is called by both of these prerequisite tasks in their action lists. Have the restriction for this third task be that before it will run that both of these tasks must be complete, this way you can assign this third consolidated task to your event and be sure that both of these other tasks have been complete. This third task doesn't need any text output unless you want some for debugging during development.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Event controls?

Postby P/o Prune » Thu Apr 26, 2018 7:10 am

It worked fine ElliotM, thanks a million.
However. I have put up an enhancement suggesting that an event can be triggered by the value of a variable or the possession of an object (for instance)
Feel free to give it a "thumbs up" Here
D-Day V.5 in progress 86Kb (Slowly drifting)
Anno 1700 Submitted to the 2018 IFComp.
User avatar
P/o Prune
Site Admin
 
Posts: 4212
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 43

Re: Event controls?

Postby saabie » Thu Apr 26, 2018 7:30 am

You could have an event that runs continuously from the start of the game and which runs a task every turn.
This task could check the value of a variable or the possession of an object and be used to start the other event if its restrictions all pass.
saabie
 
Posts: 922
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 2 guests