Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
In the event you have it setting the sprite_index every single frame for a reason (ie. defaulting to a standing sprite), then that almost guarantees your image number is resetting every frame, because, again, sprite_index is almost certainly the culprit in why you're not seeing any animation here. Essentially, you want to change your animation the instant you want it changed, and nothing more.
In any case, if you're bent on proving whether or not != is being your friend, create some variable, set it to a number, and check if it doesn't match some other number and have it change your image_blend into blue or something silly.
Thanks for the reply, however I can see the animation - it just starts from the same frame that the running or idle animation is, and so sometimes you only see 2 or 3 frames if you happen to die at the end of the cycle.
I tried if != does not work with the way you suggested, and it worked... Although whenever I add it to sprite_index, it doesn't seem to lol.
if death
{
if sprite_index=hero_death
{
image_speed = 0.1;
}
else
{
sprite_index = hero_death;
image_index = 0;
}
}
Hey man, thanks for the reply. As soon as I saw that, I felt so silly... But I just tried it, and it just freeze's the animation (it remains on image_index 0).
This is another problem I've been stuck with. Almost any other combo just freeze it. It's really strange, because it doesn't happen with my grenade animation for example - only with the main character.
First to clear one point up if you check out Help>Contents>sprite_index you will see that setting the sprite index DOES NOT reset the sub image as has been guessed at in this discussion.
Secondly I do not understand why you need to overcomplicate this code with an else or a secodn if statement. this is how I have done it and it works with some temp sprites:
One other point just to help others understand your code in future posts please use the
Eventually just did "if sprite_index = !hero_death" which seemed to work. :)
Thanks again for your help!