But basically I changed the ropes to align to the grid before flying up, instead of before coming down.
Thanks, that was an easy fix - works great now! Just copied the alignment code already there to be used while the rope is moving upwards.
// top of oRopeThrow.StepSee also Urza's bug fix for ropes below.
if (armed and yVel < 0)
if (px < x)
if (not collision_point(x-8, y, oSolid, 0, 0)) x -= 8;
else x += 8;
if (not collision_point(x+8, y, oSolid, 0, 0)) x += 8;
else x -= 8;
At the same time I thought to add something to prevent wasting ropes if launched in a confined (2 block high) space. If an 'armed' oRopeThrow hits the ceiling and has travelled less than 32 pixels from the point the player launched it, the rope fails to hook into the wall and instead falls back to the ground where it can be picked up again. This check only works if the player launched the rope while standing on the ground, as in some situations the player could be jumping out from a ledge and back to toss the rope and intentionally hit the ceiling with it.
I'm not proposing this one as necessary for the community update, but I have experience stupidly wasting ropes in such a way.
startY = 0;
// in the section that handles rope launch, look for 'holdItem.armed = true' and add:
if (platformCharacterIs(ON_GROUND)) holdItem.startY = y;
// in the section that handles rope launch, look for 'obj.armed = true' and add:
if (platformCharacterIs(ON_GROUND)) obj.startY = y;
// within the isCollisionTop(1) stuff
if (type == "Rope")
if (armed and startY > 0 and startY-y < 32)
armed = false;
startY = 0;