6 Dec 2024, 19:12

@011830-0a42ef84

The 2 objects, “player” and “rope,” are not in the same sprite, so when you run this “overlapping” block in the player sprite, it doesn’t know about the “rope” object. That’s why it is not working.

Also, testing for objects overlapping frame by frame is very expensive. Since you already know the position of the rope, it is much simpler to check the distance between the player and the rope. You only need to calculate the 2D distance between them, and if it is a small number, then you know the player is very close to the rope.

Also, the way you handle the key presses is not optimal. For example, in “when w key pressed”, you have the block to wait until key w is pressed or the object is blocked below. But when the w key is pressed again, this stack will be triggered again. Overall, this will make the project run slowly and not smoothly. Instead, we recommend you use a single forever loop to handle all keys and conditions, but each key press is handled instantly. You can check out this project for an example: play.creaticode.com/projects/66e823b5a634f8ee7d92cc88/editor?version=1