on key release condition

I noticed that it is missing. Whats the best workaround to do what it does?

Maybe something like:

Invert(A key is pressed) and Trigger once: ........Actions
But will be run once when starting the scene :frowning:

Edit: Aha! with one variable: FirstRun = 0

if Invert(A key is pressed) and Trigger once: ........if Variable(FirstRun) = 1: ................Actions ........if Variable(FirstRun) = 0: ................Variable(FirstRun) = 1

woudnt that trigger it on press- one time?

My interest is in having the ability to hold a button for X time, then on release unleash a chain of events using X time as a factor

I don’t get it… The condition will be run one time - each time the key is not pressed (invert “a key is pressed” condition) :confused:

So… You have to do it as you like, I think it might look like:

if key "Action" is pressed": ........Do + TimeDelta() to Variable(X_factor)

if Invert(key "Action" is pressed) and Trigger once: ........if Variable(FirstRun) = 1: ................Do actions with Variable(X_factor) as time since start pressing ........if Variable(FirstRun) = 0: ................Variable(FirstRun) = 1

Screenshot :wink: :


Of course the actions related to the X_factor variable should be placed instead the “Display a text” action

You could also do:

Spacebar is pressed || Do = 1 to Variable x

Spacebar is NOT pressed || Do action Variable x = 1 || Do = 0 to Variable x

this is awesome. Thank you guys :laughing:

Lizard-13> sorry I didnt get it the first time