I am Trying to create a "bullet splash" where when I click somewhere on the screen a little "explosion" goes off.
Currently, each Room has an Object in it that contains the sprite, and when I click it plays the sprite.
Is it possible to dynamically create this object on the fly, play it's animation once and then dispose of it?
Here is my current implementation being executed continuously in function room_RepExec() :
Code: AGS
Currently, each Room has an Object in it that contains the sprite, and when I click it plays the sprite.
Is it possible to dynamically create this object on the fly, play it's animation once and then dispose of it?
Here is my current implementation being executed continuously in function room_RepExec() :
function CheckGunFire() {
//Check for GunFire
if(Mouse.IsButtonDown(eMouseLeft) && Mouse.Mode == eModeReticle && intAmmo >= 1) {
bulletspark.SetPosition(mouse.x - 14, mouse.y + 18);
bulletspark.SetView(4);
bulletspark.Animate(0, 0, eOnce, eNoBlock, eForwards);
bulletspark.Visible = true;
}
}