Download

How can I detect a change in an integer variable?

Hi everyone,

So basically what I need to do is detect when there has been a change in my day variable so I can trigger a custom event/function for something to happen. My day is an integer and gets reset to 1 at the end of every month. Is it possible to do this or will I need to come up with another solution?

Thanks in advance

I’m not 100% sure of what your asking but here are two ways of doing a day check.

Screen 1 goes off the game start clock. You’ll have to calculate how many seconds are in a minute, hour etc.

1445ff2969a7d2a88245334c9917f17577ef1fe2.png

For screen 2 it goes off your computers calendar. Just move the “==” to hours and replace 59 with 24.

ee463070e7677f835c293a36c39159c0f957e1ca.png

Why don’t you just fire an event whenever your day variable changes?
Simply send the day integer to this event so you can have different behaviour for differetn days.

Repnotify on the int with branch looking at itself for the correct value to launch an event.

Whenever you need to change the day variable, instead of setting it directly; execute a function that changes the variable. Inside that function you also do queries.