Sprites - Help!
-
Ah i was only calling collideMap once and not in my game loop. This helped, thank you!
-
Nice, glad you got it working! When I have an ETA on when the fix for this issue can be deployed, I'll let everyone know.
-
I have a question about sprite animation.
I have a sprite that is animating through frames correctly when idling.
When I detect control input say c.right I set the sprite animation to the corresponding right direction frames. And set the location. The sprite is moving to the right but no longer animates until I stop pressing c.right. I assume each time I update the sprite location it's resetting the animation to it's first frame.
I've looked at example code and can't spot what I am doing wrong.
-
@sys64738 the resetting of the animation is more likely from assigning the frame when detecting the key press.
-
@Discostew yeah that's it. Trying to figure out best way to stop it retriggering. Guess a Boolean switch will do for now
-
@Martin == vs = is the oldest trap in the book! Some compilers now warn you about this one
-
I don’t know why my brain just assumes because it’s basic, it’s should be a single = and somehow magically know the difference!
-
Was this ever resolved. Just got collisions working in my latest project and then turned off show collision boxes. And well here I am with same problem as Martin.
Edit have loaded an empty map as above. And added
for x = 0 to 10 loop collidemap(bubblesprite[x]) Collide = detectspritecollision(subsprite,bubblesprite[x])
And it works very occasionly for a bit then doesn't
-
I am told that it is resolved in the next patch that has been submitted for review.
It works 100% of the time for me when using what you have done. I do also collide subsprite with the map as well however. Maybe try that?
-
@Martin oh brilliant that was the problem, I didn't collidemap the sub, so obvious in hindsight! thank you!