Stencyl 3.4.0 is now out. Get it now!

How can i make an actor's animation appear when he shots?

Black666

  • Posts: 11
I've attached a "fire bullet" behavior on my actor, so i'm able to shot. Good, Wonderful!! But i have frames of my actor shooting and now i wonder how can i make the animation show up when i fire... Could someone help me? Thanks in advanced!

JeffreyDriver

  • Posts: 1306
Is the fire bullet behaviour a pre-made one, or one you made?

Please can you post your code?

One way of doing it would be to include a block that switches the animation in the same block where the bullet actor is created. You'll then need to switch the animation back to whatever it was before.

Black666

  • Posts: 11
Is the fire bullet behaviour a pre-made one, or one you made?

Please can you post your code?

One way of doing it would be to include a block that switches the animation in the same block where the bullet actor is created. You'll then need to switch the animation back to whatever it was before.

It's a pre-made behavior. Here's the code:

https://drive.google.com/open?id=0B0gTjVJ1Tr1sZjA5ZmlOaGIyVHM

I just don't know how upload an image here.


Black666

  • Posts: 11
Is the fire bullet behaviour a pre-made one, or one you made?

Please can you post your code?

One way of doing it would be to include a block that switches the animation in the same block where the bullet actor is created. You'll then need to switch the animation back to whatever it was before.

I got it. Thank you!