Spawned NPCs Are Not Animating

This is the place for discussion and support for LunaLua and related modifications and libraries.

Moderator: Userbase Moderators

Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?
Sambo
Snifit
Snifit
Posts: 211
Joined: Fri Jan 24, 2014 6:43 pm

Spawned NPCs Are Not Animating

Postby Sambo » Thu Jun 23, 2016 5:29 pm

I have an NPC which uses custom graphics and has a changed number of frames. By default, it has 4 frames, the custom one only has 2. For some reason, instances of this NPC created using NPC.spawn() don't have an animation. They just stay on the first frame. Why is this happening, and how can it be fixed?

Quantix
Chain Chomp
Chain Chomp
Posts: 333
Joined: Tue Jan 26, 2016 5:04 pm

Re: Spawned NPCs Are Not Animating

Postby Quantix » Thu Jun 23, 2016 6:37 pm

Maybe it has something to do with the type of NPC you're using?

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Spawned NPCs Are Not Animating

Postby PixelPest » Thu Jun 23, 2016 7:11 pm

Would you please say what NPC it is and upload the graphics that you are using?

Sambo
Snifit
Snifit
Posts: 211
Joined: Fri Jan 24, 2014 6:43 pm

Re: Spawned NPCs Are Not Animating

Postby Sambo » Sat Jun 25, 2016 8:08 pm

I just uploaded this screen of the level's directory:
Image
The problem is with NPCs 33, 88, 103, and 138.
All the text files have the same codes:

Code: Select all

width=32
frames=2
As I said, the problem only occurs with NPCs spawned with the NPC.spawn() function. If I place the NPC in the editor, the animation works fine.

Willhart
Banned
Posts: 368
Joined: Thu Apr 10, 2014 2:18 am

Re: Spawned NPCs Are Not Animating

Postby Willhart » Sat Jun 25, 2016 9:12 pm

Sambo wrote:

Code: Select all

width=32
frames=2
You might need to set both width and height. I remember that causing trouble sometimes.

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Spawned NPCs Are Not Animating

Postby PixelPest » Sat Jun 25, 2016 9:15 pm

Willhart wrote:
Sambo wrote:

Code: Select all

width=32
frames=2
You might need to set both width and height. I remember that causing trouble sometimes.
Also try gfxwidth and gfxheight

Sambo
Snifit
Snifit
Posts: 211
Joined: Fri Jan 24, 2014 6:43 pm

Re: Spawned NPCs Are Not Animating

Postby Sambo » Sun Jun 26, 2016 8:52 pm

Neither of the things you suggested helped. There is still no animation. Also, wouldn't there be animation problems with ALL the NPCs, not just those created with NPC.spawn() if this was the issue?


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari