Log In  

Cart [#34484#] | Code | 2016-12-30 | No License | Embed
1

I have the sound muted -- if you want to test with the explosion sound, uncomment line 26.

The magic happens in the MAKE_EXPL function which creates a new explosion in the table (maxed out at 10 explosions). I call EXPLODE() to update all the explosions every frame.

Things I learned from this:

  • creating a RN function for a shorthand FLR(RND)
  • how to delete the oldest entry in a table
  • conditional animations based on count and argument data
  • palette cycling

I'm sure there's a better way to create the explosions using a single formula. This is the messy way. Feel free to remix with cleaner code or use this in your project.

P#34485 2016-12-30 02:50 ( Edited 2016-12-30 07:50)


[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-11-17 08:04 | 0.015s | 4194k | Q:20