Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Shell Casings

A topic by crt_future1 created 92 days ago Views: 163 Replies: 2
Viewing posts 1 to 2

I've been playing around with the FSM for weapons. I've been having a good time adding reload animations, etc. I was wondering, can you use FSM and the particles command (or the custom particles command) to add shell casings ejecting for a gun?


I gave it a quick test. Added a shell casing png to the end of the weapons image set. It's named correctly. However, when I try to use it, it crashes. I assume I am doing something incorrect.


state ATTACK IDLE 0

frame 2 0.01 0 0 0 NONE

frame 3 0.02 0 0 0 SOUNDANDATTACK 0

frame 4 0.02 0 0 0 MUZZLEANDFLASH

frame 5 0.02 0 0 0 PARTICLES 25 1,1,0,0,1,0,0,1

frame 6 0.02 0 0 0 READY

frame 7 0.01 0 0 0 NONE

frame 1 0.01 0 0 0 NONE


Here's my quick little test. I admit I have no idea what I am doing ha ha 

Developer(+1)

Hello!
MUZZLEANDFLASH should be MUZZLEFLASH
And you also need a space after the first five numbers in the 'PARTICLES' action:
frame 5 0.02 0 0 0 PARTICLES 25 1,1,0,0,1 0,0,1

Thanks for getting back to me. I changed the muzzle flash command to the correct one. However, I pasted the particles code you wrote into the FSM for the weapon attack and it still crashed. I am going to assume it's something I have done incorrectly. Everything works when I take out the particles command. Here's the code:

image Handgun 0 28

sound HandgunFire

sound HandgunReload

sound Handgunshell

sound Handgunmagcheck

state IDLE NONE 0

frame 1 0.18 0 0 0 NONE

frame 1 0.18 0 0 0 READY

state ATTACK IDLE 0

frame 2 0.01 0 0 0 NONE

frame 3 0.02 0 0 0 SOUNDANDATTACK 0

frame 4 0.02 0 0 0 MUZZLEFLASH

frame 5 0.02 0 0 0 PARTICLES 25 1,1,0,0,1 0,0,1

frame 6 0.02 0 0 0 READY

frame 7 0.01 0 0 0 NONE

frame 1 0.01 0 0 0 NONE