I’m currently trying to continue with my collision but even after getting help, it still doesn’t work, I asked for help a while ago but I didn’t get any further.
I was unable to upload the file directly, so here’s a one drive link to the ZIP.
https://1drv.ms/u/s!AjXx__1iZyltnAWXmtnjKVR31dk_?e=DSEwVP
Any help as to why my collision is not working would be heavily appreciated.
I have been stuck on this for so long and have been unable to make much progress with anything else in the meantime.
You are not matching your group and mask names. Your tilesource has a group named “objects” while your player is masking against “object” (no ‘s’):
oh my god.
Thank you so much, it’s always something so small that you don’t expect.
I’m noticing now that the collision causes the character and the screen to jitter, how would i go about fixing that?
You are using the collision.script twice: You have it both on your map and on your player. Remove it from the map.
thanks!
now that I know how collision works, I can do so much more lol
One other thing i’d like to ask, currently with the way I have my animations working (in Player.script) animations don’t work exactly how I want.
e.g. I press W and the player walks up (animation works), I then press D and the player character walks right (animation works) but then if I let go the animation will go to the idle animation
I know why this happens because of how I wrote my code, but I don’t know how to rewrite it to make it so whatever button I’m pressing (and the most recent one if I’m pressing multiple) decides what animation It plays
Well, you need to keep track of which keys are pressed, or at least in which direction the player is moving and then when a direction key is released you only ever play the idle animation if no other movement key is pressed.