[Solved] How do I make a subevent trigger based on if the parent event is true?


I am trying to create a staff in a random place and Minda has to find the staff. Sheepcoints are already in place. Once the staff is found, Minda can flip the SheepCoin to determine if its a white sheep. However, the subevent isn’t running. I know the subevent works as when I make it its own event, it works. But I want it to be dependent on Minda finding the staff first.

If the subevent isn’t triggered, the main event likely doesn’t trigger.

Is the staff supposed to be an item to collect?
I suggest you set a variable staff found to 1, once if minda is in collusion with staff.
Then you can use the variable staff found as condition.

1 Like

That worked great thank you. However, its now throwing the error now that sheep3 (which is the correct sheep to collect to win, and should only be produced once in a random place) is produced in each position and each time that all other sheep are. Should that also be dependent on a variable?

Sorry I’m new to this, not sure if I should open this as another question since this has been solved.

i am not entirely sure, how your game is supposed to work.
you have coins placed around the level
when you collide with a coin, it should reveal a sheep?
if not the right coin, reveal sheep 2 or 3.
and only one of the coins is the correct one, determined at the start?

If my assumption is correct,
i recommend you make the random roll at the start.

1 Like

Yes somewhat, did a bit of editing, but this worked. Thanks!