Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / How to get my explosion sprite to play through all its' frames

Author
Message
Ovan35
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 7th Nov 2009 11:44 Edited at: 8th Nov 2009 04:16
Ok maybe I haven't explained the problem too well.But it's kind of hard to explain.Alright I'm making a vertical shooter.What I want to do is make my enemies explode when they are hit with a bullet instead of just deleting the planes.Right now what's going on is that each time the player bullet hits a enemy plane you will see a different frame of the explosion animation.What I want naturally is for all the frames to play through when a enemy plane is hit by my bullet.Can anyone help?


It was such a small seed... I needed to find out what was growing inside. And there was only one way to find out. So I decided to raise it.

Ovan35
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 9th Nov 2009 05:39
I just wanted to let everyone know that I had found the solution to my problem.First off the main problem was I was trying to do too much in one function.I had to break it up into smaller functions in order to make it work.I included the code just in case someone else might have this same problem down the road.

The Collision Function- in this one I basically created the animated sprite.And set the frame of the animation to one.


The Explosion Function- In this function I had it look for the explosion sprite.If it saw the explosion sprite its job is to finish the animation


It was such a small seed... I needed to find out what was growing inside. And there was only one way to find out. So I decided to raise it.

Login to post a reply

Server time is: 2024-10-01 16:36:09
Your offset time is: 2024-10-01 16:36:09