ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Event statut detection?

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 statut detection?

Postby ice_wanted » Fri Jan 04, 2019 5:46 pm

To anyone knowledge, is there a means to detect if an Event is started or not (and restart it)? (as part of a task, action, restriction, expression, or other..).

I've encountered issue with event that won't properly restart following a save game. (or UNDO that finished by a game ending).
ice_wanted
 
Posts: 95
Joined: Thu Aug 22, 2013 1:12 am
Points: 10

Re: Event statut detection?

Postby DazaKiwi » Fri Mar 15, 2019 1:05 am

The Debugger wont tell you anything?
User avatar
DazaKiwi
 
Posts: 605
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16

Re: Event statut detection?

Postby The0didactus » Fri Mar 15, 2019 3:43 am

You're gonna roll your eyes but:
add a task to the event that just displays the text "BING!"

That way when you see BING you know the event started.
I build almost all the complex silent tasks in my game with text like that until i'm SURE they're working in all the situations I want them to
The0didactus
 
Posts: 171
Joined: Sun Mar 30, 2014 8:20 pm
Points: 30

Re: Event statut detection?

Postby DazaKiwi » Fri Mar 15, 2019 10:00 pm

Another similar to method to suggestion above that i do sometimes for some critical tasks is create variable called Debug set it to 1, on the tasks you want to track create an alternative description and in its restriction Debug must be 1 and to display after default, then write the name of the task in the output box eg..Task blah blah ran...

This is handy to do because it can be easier to track the order of tasks run in a project that has heaps of tasks. And then when you want to turn off those notifications set debug to 0.
User avatar
DazaKiwi
 
Posts: 605
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16

Re: Event statut detection?

Postby ice_wanted » Fri Mar 22, 2019 12:39 am

DazaKiwi wrote:The Debugger wont tell you anything?


Yes, the debugger is showing the acurrate status of the "start/stop" for each events. My issue was not seeing/tracking when the event starts or stops, but rather that the events do not return to their proper states in a very specific circumstance (issue with Adrift).

When an event is running during a "end game" scenario (ie: a task with an "end game in..."), and the player performs an UNDO after the end game, then the event will not correctly return to it pervious state. In fact, events that where stoped before the player's last command will be started and vice-versa. This generate chaos by making events that shouldn't run, run, and forgetting to restart events that should be running.

The way I patched this issue, was to have two opposite events running at all time (say: one for the day and one for the night). Each event included a "Restart" task to restart the opposite event. This way, if the previous circumstance occurs, the wrongly started event (night) restarts the "right" event (day) that was improperly stopped. Both events then execute their restrictions and shut down if they are not supposed to run (ie: the night event running during the day for example). It's not pretty but it worked.

A manual control to start/stop an event (in a task for example) would provide a better way to handle this situation.
ice_wanted
 
Posts: 95
Joined: Thu Aug 22, 2013 1:12 am
Points: 10

Re: Event statut detection?

Postby DazaKiwi » Sat Mar 23, 2019 8:35 am

Its good you found a work around, often some kind of work around is required to overcome some limitations or bugs in Adrift. Main thing is you solved it. You probably already are doing this but do make different saves/backups for your project often, i usually have v3 etc at end of file name and change it when i add new content or mechanics. There is the odd time some error is thrown and it borks the file and you cannot open it in developer. It's happened twice to me in the past, its rare but can happen. I thought to mention that, also good advice for new drifters who might read this in future.
User avatar
DazaKiwi
 
Posts: 605
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 1 guest