I have a plotscript and some oddly behaving NPCs and no clue why this happens....
Here's the code:
Code:
This is the plotscript:
plotscript, Arrested1, begin
suspend player
set tag(29,1)
# camera zooms to npc 3
focus camera (19,0,2)
wait for camera
wait(25) # Wait about 3 seconds
set NPC direction (5,east)
wait for npc (5)
wait(50) # Wait about 3 seconds
set NPC direction (2, west)
wait for NPC (2)
wait(50) # Wait about 3 seconds
camera follows NPC (5)
# walks guard
walk NPC (5,south,1)
wait for NPC (5)
walk NPC (5,east,2)
wait for NPC (5)
walk NPC (5,north,1)
wait for NPC (5)
walk NPC (5,east,4)
wait for NPC (5)
walk NPC (5,north,5)
wait for NPC (5)
walk NPC (5,north,1)
wait for NPC (5)
walk NPC (5,east,1)
wait for NPC (5)
# walks squire
walk NPC (2,south,1)
wait for NPC (2)
walk NPC (2,east,2)
wait for NPC (5)
walk NPC (2,north,2)
wait for NPC (2)
walk NPC (2,east,5)
wait for NPC (2)
walk NPC (2,north,4)
wait for NPC (2)
camera follows hero (me)
show text box (28) # hey you?
wait for textbox
set hero direction (me,east)
wait for hero
show text box (29)#me?
wait for textbox
show text box (30)#I arrest you...
wait for textbox
show text box (132)
wait for textbox
resume player
end
This is the plotscript:
plotscript, Arrested1, begin
suspend player
set tag(29,1)
# camera zooms to npc 3
focus camera (19,0,2)
wait for camera
wait(25) # Wait about 3 seconds
set NPC direction (5,east)
wait for npc (5)
wait(50) # Wait about 3 seconds
set NPC direction (2, west)
wait for NPC (2)
wait(50) # Wait about 3 seconds
camera follows NPC (5)
# walks guard
walk NPC (5,south,1)
wait for NPC (5)
walk NPC (5,east,2)
wait for NPC (5)
walk NPC (5,north,1)
wait for NPC (5)
walk NPC (5,east,4)
wait for NPC (5)
walk NPC (5,north,5)
wait for NPC (5)
walk NPC (5,north,1)
wait for NPC (5)
walk NPC (5,east,1)
wait for NPC (5)
# walks squire
walk NPC (2,south,1)
wait for NPC (2)
walk NPC (2,east,2)
wait for NPC (5)
walk NPC (2,north,2)
wait for NPC (2)
walk NPC (2,east,5)
wait for NPC (2)
walk NPC (2,north,4)
wait for NPC (2)
camera follows hero (me)
show text box (28) # hey you?
wait for textbox
set hero direction (me,east)
wait for hero
show text box (29)#me?
wait for textbox
show text box (30)#I arrest you...
wait for textbox
show text box (132)
wait for textbox
resume player
end
That's what happens:
((Uploaded with ImageShack.us))
Somehow the NPC walks diagonal, instead the way it should walk from wait to wait command.
I'd also like to move the camera one tile upwards, but I'm not sure how to do that and if I can use negative numbers like focus camera (19,-2,2) or such.
I hope you can help me to find the mistakes.



