Wrong Direction Emit

I know that there’s already a help request to get solved just the same as this post, but I’m worried that it’s too old so here’s what happen and the code:
Screenshot 2024-07-07 7.50.06 PM

You’re code is fine, you just have to add a flip behavior to the emitted objects.
I would add an extractor into the wind gust sprite and detect the direction in which the X velocity is, and then have it either flip or not flip based on the direction.

If you send a link to your game, I can make an example and send a screenshot.

1 Like

Here you go, the code is the player’s behavior, but don’t click the “play test this game” button please, just click the play button in edit object after you finish the code.

Sorry, I didn’t see your message until I was headed to work, but I finally got around to fixing it for you.


Make sure that you have the emitted object to be able to move, that way it glides slightly away from the player and can track which direction it’s heading.


Then attach an extractor to the once behavior which will determine which direction the emitted object it shooting off to. The filter is set to 0 and any number below 0 (or fail) is going to the left, which is why it’s on the “flip” input. Any number above 0 (pass) is going to the right, which is on the “back” input, but you technically don’t even need to connect it at all since it’s not being flipped at all, but just in case.