Why is the "and" boolean not working in this situation?

AlexRockey

  • Posts: 20
As can be seen in the screenshot, I'm trying to use the 'and' boolean to create an actor only when both an actor is in a region and a button is pressed, but it doesn't work. If I remove the 'and' boolean and use either only the 'key pressed' or 'in region', it works , but, not both together.
Huh??
Very confusing.

« Last Edit: March 23, 2021, 05:14:09 pm by AlexRockey »

AlexRockey

  • Posts: 20
NEVER MIND!   ::)

I literally just figured it out.
It works after swapping 'Key Pressed' and 'In Region'.
Figured it out after reading about the 'and' block and how it ignores the second condition if the first isn't met.
------------
The problems continue.
It stops working when I add more blocks to it, such as pausing.

« Last Edit: March 23, 2021, 05:15:01 pm by AlexRockey »

Luyren

  • *
  • Posts: 2645
Can't help unless you provide a new screenshot with the "more blocks" you've added.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

AlexRockey

  • Posts: 20
Just image the Pause Game block under the Create block.

Luyren

  • *
  • Posts: 2645
How do you expect your behavior to execute if you are pausing the game?

And don't ask people to imagine your code. Provide the screenshot, it's best for everyone involved.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter