Multiple 'then' actions

I feel like this is such a simple problem that I can't find an answer to. (Maybe I am searching with wrong keywords)

Is there a way to perform multiple actions when a condition is met?

IF condition is met, THEN display a text and toggle a global from 1 to 0.

Reason is I want a thing to be done when a global is toggled from 0 to 1, but then immediately toggle it back to 0 after the thing is done.

You can perform multiple actions when a condition is met, but I think that if you perform what you want, the action are going to revert to the original position, when the global go to 1 the thing is be done, when the toggle go to 0 like you want, the thing revert to the original.

Maybe if you explain a little what you want to make, is possible to choose an option to perform it.

If I understand correctly, I think you might be referring to having multiple actions when a global is toggled.

In my case, more specifically I want mutiple actions in a single if statement.

Conceptually, I am trying to do this:


Do thing 1

Do thing 2


Do thing 3

In KLWP, I would want to do something like $if(gv(var)=1,(df(hh:mma), gv(var)=0),"NONE")$

Say gv(var) is default 0, and gets toggled to 1 when an event occurs.

This formula would display the time when gv(var)=1, then immediately toggle gv(var) to 0 so the time wouldn't keep undating because gv(var) is still 1, and can react to the next event. It also guarantees that gv(var) doesn't get toggled to 0 until the time is displayed.

I think that you want to do like a case function.

You can see this.