Solarus-Games English Forum

Solarus => Development => Topic started by: Hawkinzon on January 09, 2019, 01:25:40 AM

Title: NPC disappears during walking animation?
Post by: Hawkinzon on January 09, 2019, 01:25:40 AM
Hi,

I have encountered with a custom NPC i made. I have made a "Cutscene" were the hero and this npc is running to eachother, but as soon as the npc's path reached the last value (path_movement:set_path{4,4,4,4,4,4}) the sprite disappears? If I change sprite to ie. Zelda this works perfectly and the npc stops were it should be. Do I need to create a "stopped" animation for my custom npc?

Anyone know what the problem might be? I'm pretty new to this so please be forgiving :)
If anything is unclear, just ask and I will explain more
Title: Re: NPC disappears during walking animation?
Post by: Max on January 09, 2019, 05:58:23 AM
Yeah, when you apply a movement to an NPC, the engine knows you probably want the NPC to be walking, so it sets the walking animation, then automatically calls the stopped animation when the movement is finished.
Title: Re: NPC disappears during walking animation?
Post by: Christopho on January 09, 2019, 08:21:17 AM
This is true for NPC of type "usual" (somebody). Use an NPC of type "generalized" (something) to avoid any default behavior.