Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: The Man on April 11, 2013, 12:13:56 PM
-
I know it will sound stupid to most of you, but I've got this problem...
I need my actor to change his idle animation after a certain action and to obtain this I used the code:
actor.SetSprite("actors/Lars/ul/defaultposter.sprite");
The problem is I don't know how to go back to normality! If I use this code the actor will ALWAYS use "defaultposter.sprite".
Probably there must be a simple function to obtain what I need, but I can't find it!
Can somebody give me a help?
-
How a something like
if (condition_met == false)
{
actor.SetSprite("actors/Lars/ul/defaultposter.sprite");
}
else
{
actor.SetSprite("actors/Lars/ul/other.sprite");
}
where condition_met is a global
-
But if I use again SetSprite the problem persist because the actor will use THAT sprite("other") for every standing animation...
-
To reset the value, just use actor.SetSprite(null);
-
I knew it had to be THAt easy.
Thank you very much and I apology for opening such a simple thread!