battlestar_caprica
Member
Okay well i'm making a short of stealth mini-game and i'm having problems. Basically, i have a cone of vision already coded by a friend of mine so if you step into the cone, guards will spot you and etc.
The problem is I want to display that cone of vision on the map so that the person playing my game can actually tell whether the guards see him.
More or less what I want to do is display a picture that is always one tile infront of the guard. So if they are facing left, the cone picture faces left. If they are facing right, the cone picture faces right. When the event (guards) move forward, the cone moves forward with it, always staying one tile ahead no matter which direction the event faces.
If someone could explain to me basically how to draw the picture so that it follows the guard-events at all times and how to call up the pictures for whichever events are actually guards.
Example: Events 1,2,3 are guards so the script draws up the cone.
Events 4,5,6 are civilians so no cones are drawn.
Lastly, i'd like to know how to layer the picture. Basically, so the cone isn't visible through walls or roofs but visible on ground etc. Here is what i am getting at (this is just a mockup using Paint, i haven't been able to display the cone yet);
http://i61.photobucket.com/albums/h72/R ... lecopy.png[/img]
Any help with any of my questions would be greatly appreciated,
Thanks in advance.
The problem is I want to display that cone of vision on the map so that the person playing my game can actually tell whether the guards see him.
More or less what I want to do is display a picture that is always one tile infront of the guard. So if they are facing left, the cone picture faces left. If they are facing right, the cone picture faces right. When the event (guards) move forward, the cone moves forward with it, always staying one tile ahead no matter which direction the event faces.
If someone could explain to me basically how to draw the picture so that it follows the guard-events at all times and how to call up the pictures for whichever events are actually guards.
Example: Events 1,2,3 are guards so the script draws up the cone.
Events 4,5,6 are civilians so no cones are drawn.
Lastly, i'd like to know how to layer the picture. Basically, so the cone isn't visible through walls or roofs but visible on ground etc. Here is what i am getting at (this is just a mockup using Paint, i haven't been able to display the cone yet);
http://i61.photobucket.com/albums/h72/R ... lecopy.png[/img]
Any help with any of my questions would be greatly appreciated,
Thanks in advance.