Player 1 simply presses up, down, left, right to move around nicely.
Player 2 on the other hand is coded to be controlled by A, S, D, W. I used this script I found on the wiki to do so:
Code: Select all
#Move NPC 0 (Player 2)
variable (npc cursor)
npc cursor := 0 # first NPC with ID 0
if (npc is walking (npc cursor) == false) then (
# Only move the NPC after they've finished the previous movement,
# also use elseif to prevent moving in two directions at once.
if (key is pressed (key:A)) then (walk npc (npc cursor, left, 1))
else if (key is pressed (key:D)) then (walk npc (npc cursor, right, 1))
else if (key is pressed (key:W)) then (walk npc (npc cursor, up, 1))
else if (key is pressed (key:S)) then (walk npc (npc cursor, down, 1))
)
EDIT: Also I have more questions regarding why player input while game goes from title to map screen (or through doors) can cause unexpected errors in game, but I figure I'll solve this first and see if it makes a difference.
