Page 1 of 1

Event statut detection?

PostPosted: Fri Jan 04, 2019 5:46 pm
by ice_wanted
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).

Re: Event statut detection?

PostPosted: Fri Mar 15, 2019 1:05 am
by DazaKiwi
The Debugger wont tell you anything?

Re: Event statut detection?

PostPosted: Fri Mar 15, 2019 3:43 am
by The0didactus
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

Re: Event statut detection?

PostPosted: Fri Mar 15, 2019 10:00 pm
by DazaKiwi
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.

Re: Event statut detection?

PostPosted: Fri Mar 22, 2019 12:39 am
by ice_wanted
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.

Re: Event statut detection?

PostPosted: Sat Mar 23, 2019 8:35 am
by DazaKiwi
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.