jonjons
Member
Hello everyone, I would like to know what is the best way to instatiate a peojectile instance or effect or play sound during an animation ?
I mean the best practice that people are using these days ?
Its a problem thats been haunting me, everytime from day 1 ever since i started using GM... Having an instance created in a certain animation frame, and to have that instance spawn 60 times in all 60( steps/frame per second )... having to create a variable on/off and a new case or if statment just to lock that instance from spawning multiple times... It turns the code into a mess with multiple bla bla bla variables flying around.
Ive been looking again into ( animation event ) and ( animation Update ) but these are all related to spine animations.
Also i rebember watching a Heart Beast video (now lost), were he could instatiate an instance only once by fiding the correct time frame 0.05 / 2.025 etc... in an animation. And being able to change that animation speed at any time without having to change the code.
Is there a way to work with the animation itself (timeLine / timeFrame), instead of using the (60 steps) processing step event ?
I mean the best practice that people are using these days ?
Its a problem thats been haunting me, everytime from day 1 ever since i started using GM... Having an instance created in a certain animation frame, and to have that instance spawn 60 times in all 60( steps/frame per second )... having to create a variable on/off and a new case or if statment just to lock that instance from spawning multiple times... It turns the code into a mess with multiple bla bla bla variables flying around.
Ive been looking again into ( animation event ) and ( animation Update ) but these are all related to spine animations.
Also i rebember watching a Heart Beast video (now lost), were he could instatiate an instance only once by fiding the correct time frame 0.05 / 2.025 etc... in an animation. And being able to change that animation speed at any time without having to change the code.
Is there a way to work with the animation itself (timeLine / timeFrame), instead of using the (60 steps) processing step event ?