C
Costco2
Guest
Hello there, I've been trying to change my sprite index to a hurt sprite when my rock object collides with my hero sprite, in my rock object I have this written:
with (other)
{
hp = hp - 25;
sprite_index = sHeroHurt;
}
instance_destroy()
It seems to only flash it for a brief second, I was trying to add a collision code on the hero object but that didn't seem to work, I've been lurking around at other post and someone noted an alarm statement, but I couldn't figure out the code to get it to work, any help or thoughts would be greatly appreciated!
with (other)
{
hp = hp - 25;
sprite_index = sHeroHurt;
}
instance_destroy()
It seems to only flash it for a brief second, I was trying to add a collision code on the hero object but that didn't seem to work, I've been lurking around at other post and someone noted an alarm statement, but I couldn't figure out the code to get it to work, any help or thoughts would be greatly appreciated!