I want to place the 4 heros around an NPC/ set the heros position relative to an NPC.
The script shall be run by several npcs. So I want to use the NPCs ID Number script argument to hand the NPC's ID to the script.
Some assumptions I made:
The x position of the NPC is recived by the script with NPC X (id), right?
The datatype of an NPC's x position is a number? Why can't I do "set hero position (0, NPC X (id)-1, NPC Y (id))?"
I am told I'd give 4 arguments where 3 are required. I do not see how/why I hand in 4 arguments.
No knowing what to do, I tried to work around with variables. But it dosen't work either:
Code: Select all
plotscript, use_shrine, id, begin,
# id = id of npc that called script
showtextbox(122)
wait for textbox
alter NPC (id,NPCstat:picture,113)
wait(16)
alter NPC (id,NPCstat:picture,114)
wait(16)
alter NPC (id,NPCstat:picture,115)
wait(16)
alter NPC (id,NPCstat:picture,116)
wait(16)
alter NPC (id,NPCstat:picture,117)
wait(16)
alter NPC (id,NPCstat:picture,112)
wait(16)
use shop (3)
fade screen out
variable (hero_x, hero_y, hero1_x, hero1_y, hero2_x, hero2_y, hero3_x, hero3_y)
hero_x := NPC X (id)-1
hero_y := NPC Y (id)
set hero position (0, hero_x, hero_y)
hero1_x := NPC X (id)
hero1_y := NPC Y (id)-1
set hero position (1, hero1_x, hero1_y)
hero2_x := NPC X (id)+1
hero2_y := NPC Y (id)
set hero position (2, hero2_x, hero2_y)
hero3_x := NPC X (id)+1
hero3_y := NPC Y (id)
set hero position (3, hero3_x, hero3_y)
fade screen in
wait(32)
end