I have some OR block code. but when I use the mouse I have to pick which object I clicked so I need to add ANDs but you can't mix AND and ORs
so I did it with 2 different events, but its not working. how is this done without repeating the code for a mouse specific event?
https://www.dropbox.com/s/zq5lp8zpl91cuuv/mouseCapClick.c3p?dl=0
The issue is that you are using a local Variable which it will reset the value on the next Top event
Example:
-On Event 2: >>>>> Left Mouse click set the mouseclicked to = True
-On the Next Top Event which is "Event 3" it will reset the mouseclicked to = False because that is the default state
-So by the time it checks "OR Is MouseClicked" the state of the local var mouseclicked is = False
The easy fix will be to drag the local variable outside the group to make it global so it retains the state once you change it
or
Save it in a dictionary
or
Just add an object in the layout just for instance variables so you can use it as global variables by making it global you will be able to use it in any layout.