Posted by Just another Oldbie on 2/19/2005, 9:15 am, in reply to "How do I make a NPC be able to see?" Hope this helps a little on the thought process atleast! --Previous Message--
68.57.245.187
Read in the Plotscript dictionary under "Tweaking Maps". There is a section on Read Pass Block (x,y) that _may_ be of some help. I assume that when you mention the NPC 'seeing' the hero, you mean that the NPC is on the same viewable portion of the map as the hero. In this case, you could check all the tiles around the hero using the Read Pass Block and if one of the tiles is a wall, the NPC will not 'see' you through it. This could be achieved by getting the hero's position and checking the tiles around him by using a series of X++N and Y++N, where X is the hero's X position on the map and Y is the hero's Y position, in a loop structure.
: Let me explain the problem... Iīm trying to make the
: npcs be able to see the hero.
: In fact I already did a script that generates the view
: range of each npc, but itīs really hard to make they
: donīt see trough walls or other npc.
: Can some one help me?
:
Message Thread:
![]()
« Back to thread