Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Problems with explosions

A topic by VintageGamerC64 created 37 days ago Views: 48 Replies: 4
Viewing posts 1 to 5

Hi, I'm new here.

Sorry for my English, it's not my native language.

The Easy Game Maker is a fantastic tool for creating 2D games. I've started making some space shooters and I've already got further than I thought.

But I'm having problems with explosions, like with the copter game. I can get the explosion to work as an animation, but it repeats endlessly.

Trying to use the time condition for x seconds sometimes works, but most of the time it doesn't. What am I doing wrong, or how can I do it better?

I'm grateful for any help, thank you very much.

Please help.

Developer

Hello, VintageGamerC64.

You have 2 options to do that.

Option 1:

When creating the explosion animation, just disable the "loop" checkbox, so the animation will not repeat endlessly. And use a transparent image for the last animation frame, like was done in the Copter game.


Option 2:

Another option is to create an object variable, for the elapsed time. Add 1 to the variable on animation frame. And add a condition, when elapsed==5 (or the number of frames in the animation) then remove the object.



Hello easygamemaker, thanks for your quick reply and your effort.

I actually hadn't seen the loop in the animations. That's the first solution to the problem. :)

However, I have another problem with your two options. I use the create object function with an explosion animation to destroy an enemy object. But the explosion must then of course take place in the same place where the original enemy object was.

In the copter game, this was solved with the expression $copter.x and .y.
How do I have to declare the variable and what is it called if I want to use the last position of the enemy object?

Thank you very much for your help.

Problem Solved

I found the solution myself. The object is called Enemy and with the expressions $Enemy.x and $Enemy.y it worked as a loop object.

I am not quite sure when I should use a normal object an when i should use a loop object. I will try it out.

But my little game already does many thinks I want it to do, so i am quite happy.