Custom animation system not working, no reason why

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
SpeedySloth
Prole
Posts: 9
Joined: Thu Jul 19, 2018 7:52 pm

Re: Custom animation system not working, no reason why

Post by SpeedySloth »

pgimeno wrote: Fri Jul 20, 2018 6:06 pm There must be some communication problem. What I'm asking is, what are you changing in order to get the result you expect (but doesn't work)?

An example of an answer to that question would be something like along these lines:
  • I'm editing gamestates.lua, and in the function gamestate.load I'm changing this line:

    Code: Select all

        player.texture = image1
    
    to this:

    Code: Select all

        player.texture = gamestate.playerswingupanimatlas
    
    but it's showing the movement texture instead of the swing texture.
(I tried, it's indeed showing the swing texture, so that's not it for sure, but it's an example of a possible answer)

player.texture is the image that is ultimately drawn to the screen. It's defined in States/gamestate.lua and used in Sprites/sprite.lua. Are you changing player.texture? How? Where?
Don't worry, it's fine. Basically, I was under the impression that whatever image1 was assigned to, dictated every image. But instead, I was just being a complete idiot, and forgot to change self.texture to self.currentanim.getatlas in the sprite.draw() method. Sorry for wasting your time :(

Since that is fixed, I think I'm solved all my issues. Thanks for your help. Seriously. I'm so glad I've (Basically you've) fixed the animation issue, and I can finally continue work on my project! :awesome:
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], bostonstrong567 and 4 guests