[Solved] Toggle object variable does not work inside OR statement using key pressed if its variable of same object with condition to click/touch that object

I am not 100% sure if its a bug but a user on discord found it and i think went to sleep so ill just report it

IF i use in this action scene variable everything works fine so toggle boolean var well toggle itself


Yet if i am using object variable then its not toggling when i press Q
It works if i remove OR statement
It works with Q button pressed and Reset 2 pressed
Yet not if OR is in this condition

Thx to Keith turns out that like i said it works perfectly fine with scene variable
But also if object variable is not variable of object which is inside OR condition

Seems what is below is not relevant but i am leaving it so Keith’s messages below make sense

    • Even if i put OR like this in the condition

      Holding Q and pressing Reset2 or holding Reset2 pressed and pressing Q does nothing

I removed trigger once still same effect

It is not caused by multitouch button since this user i was trying to help 1st used button panel sprite

I’m a bit confused. For the last 2 images , are you aware that the conditions are not inside the OR condition?

Yeah what i meant by that is even if its outside of OR statement
And i press both Q on keyboard and Reset2 button is clicked
Then it still do not work
Like OR is causing object variable not to toggle when Q key is pressed
While as i mentioned scene variable toggles without a problem
Either with Q pressed or with Reset2 button clicked while them being inside OR

Does it work without the OR? I just tested an event with just an OR and it doesn’t trigger the action. I’m assuming you need at least 1 sub-condition, ideally 2 since it’s an OR.

Edit: I’m curious if the first works because the way OR works is it tests all conditions. If the object 1 is false but the other is true then while it would trigger the actions, I don’t know if there would be any object picked for the actions to use. You may need to repick the object with a pick all either condition or action.

You are right - I updated my bug report
OR statement needs at least 1 sub condition
So lets do some tests

This


Works perfectly fine for scene var by either pressing Q or clicking Reset2
Top event is scene var while bottom is object

And for object variable bottom event
Q button pressed does not toggle variable while clicking Reset2 button does toggle it
You need to press green button with arrow to the right to start game
Red button on the bottom left is Reset2

Just to be sure i switched object variable (bottom event)
To different object
Imagine now both events work perfectly fine

I don’t agree with the way OR works but I’m told that’s how it’s supposed to. It tests all conditions even the 1st one is true. So, if an object was tested with a condition inside an or it wouldn’t be picked. So, even if the other condion were true the action wouldn’t have the other conditions object. Using another object or variable or a select all does the trick.

1 Like

Ok THX i gonna report it to that user

1 Like