[W A S D] Movement Help
So I'm Making A Game That I Want To Rely On [W A S D] Movement For The Players, But I Currently Have [Mouse]/[Trackpad] Movement. The Problem Is I'm An Idiot When It Comes To JavaScript And I Don't Know How To Switch Over To [W A S D] Movement Or What To Replace To Do So. If Someone Could Help It Would Be Greatly Appreciated! Code To Fix Shown Below!
Sincerely, Voiddshade
players = object end
connection = new ServerConnection()
x = 0
y = 0
end
update = function()
if mouse.pressed and (mouse.x != x or mouse.y != y) then
x = mouse.x
y = mouse.y
connection.send(object
x = mouse.x
y = mouse.y
end)
end