Hello. I couldn't get the most basic thing done for some reason :c
I have set edgemarkers so that a Cat sprite won't fall off. The right edgemarker seems to work sometimes but once the cat is running to the left it doesn't work at all. The collision polygon is exactly the same width and height as every animation and centered. All the images in the animations are 32x32. The edgemarker also have collision
Topleft point: 14,15
Topright point: 18,15
Bottomleft point: 14,32
Bottomright point: 18,32
Origin and imagepoint: 16,32 (Num-2)
Here are the events:
Here's the layout. The player, cat and the edgemarkers are on the same layer:
Thanks for the help and I apologize for being a newb!
Develop games in your browser. Powerful, performant & highly capable.
You need to do a on collision with edge marker go left, else go right... something like that. It's the else that is the secret... check the basic platformer tutorial for an example. This bugged me forever too.
Thank you for the reply!
I tried and it's still not working.
I am thinking the problem might be about the random variants that it chooses as you can see in the event list. (Every second, give a number between 1-10. if the number is 1 or less then change string variant.)
I guess I will have to remake the whole cat thing and try again.
Try it step by step, first get the collision working then add the variants to it once it is working correctly. You should be testing each piece of functionality as you add them, instead of adding a bunch and then testing, it makes it hard to see what broke it.
Ok I fixed it. It must have been something with the animation with the cat after all.
Basically what I did to fix it was to have a CatBox. Similar to the PlayerBox and have every tick put Kitty into the Catbox.
The CatBox gets to have all the variables and movement.
Thank you for the reply! Really appreciate it :)