"Figured out!!!" How do I make multiple explosions like in MegaManX?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • An explosion is usually an active object with a bunch of frames. You may have the same active object with different explosion frames, max 32, stored in each of its directions.

    You may ceate a random number of that active ( say between 20 and 30 so that is shows always different ) with a fast loop and each of that active object will have a random direction, and put at a random position around the center of the defeated boss. You may also rotate each active object with a random degree, so that the same explosions look different. This has to be done before you destroy the boss, otherwise you don't have access to the boss coordinates x and y, which you need in order to position the explosion actives accordingly.

    This could be indeed achieved with a fast loop, or with a simple event that repeats until an alt. values reach a specific value, for example, you give to an alt. variable a random value say between 20 and 30, and in the event which creates a single active object you decrease that variable, so that the condition that raises the event will no more trigger when the alt. variable is equal to 0.

    It is up to you to take the way you do it. An event will trigger at each game frame, a fast loop is lightning fast.

    Do not forget to destroy each active object once the explosion animation has ended !

    Hope it helps, have fun !

  • Semar, thanks for the explanation!!! The only thing that I can't seem to figure out is how to create explosions at different random positions of the enemy.

    I can create the explosions. I just don't know how to position them randomly on the enemy. Hope this makes sense!

  • create explosionActive at 0,0

    set x of explosionActive = x of enemyBoss + randomRange (-width of enemyBoss, width of enemyBoss) + offset

    same for y, using height of enemyBoss.

    Change the offset value as you like, for example 5, 12, or better, make it random.

    Please note that the above "code" is just a pseudo-code. But I'm confident that you will find the right commands :)

    Hope it makes sense to you

    Take care

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!