Problem with explosion animation

Hey all,

Hope everyone is doing well! I'm writing this in hopes that somebody in this wonderful community can assist me. I have an 18-frame animation that plays every time my Player Actor's bullet collides with the Enemy Actor. It is a fiery explosion, and it runs smooth and flawless. I accomplished this by constraining Enemy X and Y attributes to the Enemy's self.Position.X and self.Position.Y, and then spawning an "Explosion" Actor at those locations. This makes it so that when I blow up the enemy, the animation plays and STAYS in that position. The only problem I'm having is with the white square (200x200) that represent my Explosion Actor. As soon as i blow up the enemy, the white explosion actor appears for a split second before disappearing and playing the animation. It's not a huge problem, because it does disappear quickly, but I was hoping someone could help me get it to stay invisible altogether. I tried messing with the opacity of the actor, but that makes it so that the animation itself is completely invisible. Anybody out there have somewhat of a solution? I'd really appreciate it! Thanks!

Comments

  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    Is your actor a white square or did you replace it with an image from the animation?
    Have you tested this on your device through the viewer or adhoc?
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    edited September 2013
    Try one of these:
    1) Put an image on the explosion actor. (Perhaps use the first frame of the explosion.)
    or
    2 Preset the alpha of the explosion actor to 0. Then, just as the animation begins, change its alpha to 1.
    or
    3) Preset the size of the explosion actor to 0x0. Then, just as the animation begins, change its size to 200x200.
  • mataruamatarua Auckland, New ZealandMember Posts: 854
    Copy the first frame or last frame of the animation - mostly clear - in the image space of the the actor so it's not a white box but the image that shows next to when the white box appears yeah?

    Cheers, M@
  • @bjandthekatz, currently my actor is a white square that spawns the animation. i didn't even think about setting the first image from my animation as the actor image. I'll give that a try, thanks for your reply!
  • RThurman, I appreciate your detailed response. I'll give all of those a try in future aspects of the game in order to try some new techniques out, awesome stuff. For now, changing the image of the actor worked fine. Thank you and @matarua and once again thanks to@bjandthekatz!
Sign In or Register to comment.