Forum rules - please read before posting.

ActionList behavior with Run In Background

Hi!
I’m trying to set up a click based interaction with a Hotspot.

What I want is:

If the Hotspot is clicked fewer than 5 times → show Bubble 1
If it’s clicked more than 4 times → show Bubble 2 (Crown Bubble)
If it’s clicked more than 9 times → show a “Box Rising” animation

I set “When running” to “Run In Background” because I expect players to click rapidly, and I was worried that using “Pause Gameplay” might make the interaction feel unresponsive or hide the cursor.

I built the ActionList like this:

First, check if the local variable isRunning is equal to 1
If it is 1 → increase BubbleClicked by 1
If it is 0 → set isRunning to 1, then increase BubbleClicked by 1

Then:

If BubbleClicked > 9 → play the "Box animation"
If not → check:
If BubbleClicked > 4 → play "Crown Bubble animation" and set isRunning back to 0
Else → play Bubble and set isRunning back to 0

ActionList Editor Screenshot

However, I’m running into issues:

  • The Box animation doesn’t play even when the value is well over 9
  • The bubbles sometimes don’t stop playing

So it seems like something is not behaving as expected, possibly with how the ActionList is running or overlapping.

I was able to get this working with code (AI helped me with that), but I’d really like to understand what’s going wrong in the ActionList setup so I can control it more easily later.

Does anyone see what might be causing this?
Any advice would be appreciated. Thank you.

Comments

  • Once isRunning is set to 1, you end the ActionList after you increase BubbleClicked.

    Since Actions 1 and 17 are the same, you could remove 17 and connect 0 to 1 directly, so that the rest of the logic that follows gets run.

  • Thank you for your reply!

    However, when I connect them that way, the animations don’t stop. I thought it might be related to the Run in Background setting, so I added an isRunning check. My goal was to prevent any other animation from triggering - even if the ActionList is clicked - until the current one finishes (until isRunning returns to 0).

    I realize I may not fully understand the difference between Run in Background and Pause Gameplay yet, so I’ll look into that further.

    Thanks again for taking the time to help!

  • Run In Background merely allows gameplay to continue while it runs, allowing the player to further interact / move in the scene during this time.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.