Code:
include,plotscr.hsd
include,cratemaze.hsi
include,scancode.hsi
plotscript, master controls, begin
master k controls
end
script, master k controls, begin
A key
S key
D key
W key
end
script, A key, begin
if (key is pressed(key:A)) then
walk NPC(0,left,1)
wait for NPC(0)
end
script, S key, begin
if (key is pressed(key:S)) then
walk NPC(0,down,1)
wait for NPC(0)
end
script, D key, begin
if (key is pressed(key:D)) then
walk NPC(0,right,1)
wait for NPC(0)
end
script, W key, begin
if (key is pressed(key:W)) then
walk NPC(0,up,1)
wait for NPC(0)
end
include,cratemaze.hsi
include,scancode.hsi
plotscript, master controls, begin
master k controls
end
script, master k controls, begin
A key
S key
D key
W key
end
script, A key, begin
if (key is pressed(key:A)) then
walk NPC(0,left,1)
wait for NPC(0)
end
script, S key, begin
if (key is pressed(key:S)) then
walk NPC(0,down,1)
wait for NPC(0)
end
script, D key, begin
if (key is pressed(key:D)) then
walk NPC(0,right,1)
wait for NPC(0)
end
script, W key, begin
if (key is pressed(key:W)) then
walk NPC(0,up,1)
wait for NPC(0)
end
It compiles, so I assigned master controls to key is pressed script. However, when I try to move NPC 0, he starts to trip out and walk werever he wants, and then I get an error warning ingame.
Whats wrong with this script?



