well
when you hit up in the presense of a ladder youre supposed to attach to it
if you hold up, you climb up
hold down, obviously goes down
if youre not holding either button and are still on the ladder, you stay on the ladder
sadly im still very wet behind the ears on GM and cant quite figure out how to do all that
if (keyboard_check_pressed(vk_up))
{
if position_meeting(x,y,obj_ladder)
{
climb = true
gravity = 0
if (keyboard_check_direct(vk_up))
{
vspeed = -4
}
if (keyboard_check_direct(vk_down))
{
vspeed = 4
}
}
else
{
climb = false
}
}
There was an extra space in there. “position_meeting (x,y,obj_ladder)”
If that wasn’t the problem, try making the code actually move the character, not just set vspeed. So change vspeed = -4 to y -= 4 and vspeed = 4 to y = 4.
Also, the first if checks for up, and the third if checks for down. Isn’t that impossible?
EDIT: Problems I foresee with your code:
You will still be in climb mode forever as long as you don’t press up while not on the ladder.
vspeed will not change unless you change it elsewhere in the code.
If I were you, I’d restructure the code like this.
if position_meeting(x,y,obj_ladder)
{
if (keyboard_check_direct(vk_up))
{
climb = true
gravity = 0
y -= 4
}
if (keyboard_check_direct(vk_down))
{
climb = true
gravity = 0
y += 4
}
}
else
{
gravity = <normal gravity>
climb = false
}
EDIT2: My code is worse in the sense that the “else” is running constantly, though, which would interfere with other parts of the program. Not sure what the optimal way is.
EDIT3: Oho. Here we go:
I played Faxanadu a lot when I was younger, but I really don’t know why.
The game had shitty graphics and terrible controls, but I could try to fix the sprites you posted.
holy crap!
that took longer then expected
(had some personal and family issuses)
soooo
after a loooong “vacation”
im almost back completely
few minor things to hack out and i’ll be back on track
(i havent gotten shit done in waaay to long x.x)
BUTCH
i know exactly how you feel
the sword took too long to stick out and the control were just messed up
graphics i dont really care about but they did suck
still it was one of the best games ever o.o
i dont get it
and please feel free to fix em
infact i encourage it ^^