Problem with explosion animation
williamtyleradair
Member Posts: 12
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!
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
Have you tested this on your device through the viewer or adhoc?
Need Help? Email Me | Templates | Full Game Source Code
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.
Cheers, M@