If the conditions are met, then the script 'Check' is run to toss out the result of such an interaction.
Right now, the loop compares the locations of the hero and NPC's 0-17.
[edit]The script actually doesn't display properly on the forums for some reason. Leaving the posted text version here in case it's actually relevant.
Code:
script, Activation, begin
variable(counter)
for (counter, 0, 17, 1)
do(
if(
(hero pixel X (me) + 10) >> (npc pixel x (counter) -- 10) , and,
(hero pixel Y (me) + 10) >> (npc pixel y (counter) -- 10) , and,
(hero pixel X (me) + 10) <<npc>> (npc pixel y (counter) + 30)
)
then(
Check (counter, current map)
counter := 17
)
)
end
variable(counter)
for (counter, 0, 17, 1)
do(
if(
(hero pixel X (me) + 10) >> (npc pixel x (counter) -- 10) , and,
(hero pixel Y (me) + 10) >> (npc pixel y (counter) -- 10) , and,
(hero pixel X (me) + 10) <<npc>> (npc pixel y (counter) + 30)
)
then(
Check (counter, current map)
counter := 17
)
)
end
Code:
script, Check, npc, map, begin
if(map == 1)
then(
if(npc == 0)
then(
show text box (16)
wait for text box
)
)
end
if(map == 1)
then(
if(npc == 0)
then(
show text box (16)
wait for text box
)
)
end
However, even when the conditions are met, the script doesn't seem to acknowledge it.
NPC 0 should be activated from the pixel x-coordinates of 810-850 and pixel y-coordinates of 1350-1390.
Any insight would be appreciated, thanks.
[edit]
Tried testing 'Activation' with a true statement in place of the huge 'if' condition, and the rest of the scripts worked fine.
So the issue is most probably in there.
[edit]
Tried changing the 'if' condition to:
Code:
if(
(npcpixelx(counter) -- 10) << (hero pixel X (me) + 10) << (npcpixelx(counter) + 30)
&&
(npcpixely(counter) -- 10) << (hero pixel Y (me) + 10) << (npcpixely(counter) + 30)
)
(npcpixelx(counter) -- 10) << (hero pixel X (me) + 10) << (npcpixelx(counter) + 30)
&&
(npcpixely(counter) -- 10) << (hero pixel Y (me) + 10) << (npcpixely(counter) + 30)
)
Now it's always true
Am thinking X<<Y<<Z doesn't mean what I think it means.



