How do I make the player 2 keys work? I'm trying to make s and f the movement for p2 but it won't work. It's just a little game movement thing. The code is here:
function _init()
position = 63
p = 63
end
function _update()
if btn(➡️) then
position+=1
end
if btn(⬅️) then
position-=1
end
if btn() then
p-=1
end
if btn() then
p+=1
end
end
function _draw()
cls()
spr(1,position,63)
player1score = 0
player2score = 0
player1name = "wooper"
player2name = "quagsire"
print(player1name)
print(player1score)
print(player2name)
print(player2score)
spr(2,p,73)
end
you need to pass a parameter to the btn/btnp functions to get another player than p1:
if btn(⬅️,1) then player2x -= 1 end
wait @merwok, so I have the ability to move p2 left but now i cant move p1 at all, and i have no idea how to make p2 have more buttons aswell so i am quite stuck, help please
Update: I can move p2 up down left and right but now p1 cant move at all
[Please log in to post a comment]