Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Controlled Explosions.


Daniel

Recommended Posts

Hello, since I already got that other explosion thing out of the way, I need assistance again. Is there a way to make controlled explosions in TGF2? Like the explosions that appear after you defeat a boss in the classic 2D Sonic games...

...and like always, everyone who helps gets their reputation up.

(My god, I think I just asked the simplest question in the whole SFG community :ssleep: )

EDIT: Holy crap! 100 posts already!?

Link to comment
Share on other sites

Well, I guess that when you kill the boss, you add a 'Destroy Object' action to the events, right?

In this case, it's dead easy: Just make the exploding animation, and put it in the 'Disappearing' animation group of the active object. TGF/MMF automatically uses the Disappearing animation when a 'Destroy' action is executed.

Or, if you do it in other way, let's say that the boss object isn't intended to be destroyed (deleted from memory) as you still need it for some values or something. In this case add some kind of 'Boss defeated' value, then do this:

Create an 'Explosion' active object, and have it outside the frame.

Then:

+Value 'Boss Defeated' = 1

+Only one action when event loops (this will create only one explosion, not a load of them)

--*Make 'Boss' invisible

--*Create 'Explosion' at 0,0 from 'Boss'

And if you need the boss again, just make it visible one more time.

I don't think you'd need to keep the boss object, so the Disappearing animation is recommended.

EDIT: As you say 'in classic Sonic games', well, I guess you want to make it so the boss starts backing up and starts to have multiple 'miniexplosions'. In this case, it's similar to the above example:

+Value 'Boss Defeated' = 1

--*Set 'Boss' Animation to 'Defeated' (an animation with the charred Robotnik for example)

--*Set 'Boss' Movement to #2 (Create a path movement or something so that the boss backs up, or escapes, whatever)

+Every XX:XX (the interval between each miniexplosion)

+Value 'Boss Defeated' = 1

--*Create 'Explosion' at 0,0 from 'Boss'

During this moment, the explosions will be created wherever the boss is, so as it keeps escaping for example, an explosion will pop at each interval.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...