[SOLVED] Fire Bullet Behavior and Tween Problem

Hi! I want to make a shooting behavior to my player as well as the enemies and my idea is like this:

First, the player/enemy will tween it’s scale up.
Second, the player/enemy will fire a bullet (using the fire bullet behavior) and tween it’s scale down to it’s original size.

I want this style of shooting behavior so that the player is aware that the enemy will shoot because it will first scale up to act as a signal that the enemy will shoot. As well as to have an animation for the enemy/player before and during the shooting happens.

Here’s the events so far that’s not working:

Hope someone can help me with this, Thanks!

Try removing the tweens
When ScaleUp is finished add an action Remove Tween “ScaleUp”
When ScaleDown is finished add an action Remove Tween “ScaleDown”
This way you ensure that actions inside only will run one time, because when ScaleUp finishes is true you’re calling fire all the time, same with ScaleDown.
Or try adding Trigger Once, but is a best practice to remove tweens when they finish.

1 Like

It works now. But it only works every time I press the mouse and not when I hold it. I want it to work continuously when I hold the mouse left button.
Here’s the events so far:

Change the first event and add the conditions to make sure Tween “ScaleUp” and Tween “ScaleDown” don’t exist :

image

1 Like

It works now, Thank you so much.