Skip to main content

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

Spawn an explosion at coordinate?

A topic by Scruffy86 created Apr 23, 2024 Views: 155 Replies: 1
Viewing posts 1 to 2

Is it possible to spawn an explosion at a specified grid coordinate, so that when a player steps on a certain trigger script, the explosion will spawn and play each frame at the designated coordinate?

I do see a section in the manual for FSM that mentions explosions: 

.................

Enemies and Decorations

EXPLOSION name radius - creates an explosion with a name and radius where name is name of explosion sprites. Sprites must be place in Data/Sprites/Effects.

....................

But I'm not sure that's what I'm looking for. 

(+1)

They can also be reproduced by creating dummy enemies that bomb the moment they are generated.

First, create a dummy enemy who self-destructs upon death(Explosion radius is set in the editor) and his FSM file.

Use SETVAR to set a variable at the beginning of state CHASE, and then use that variable in JUMPIFEQUALS to move to state DEATH.

Finally, generate them in a specific location with a script.

This way, when the script is activated, the explosion can occur at any coordinates.