Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Help with Pictures

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.
 
You should probably post your script.

However, you can't layer pictures as it would mess up your game. You should ask you friend to do this, its not just a few edits. You would need to make a new sprite instance in Sprite_Set map and use @viewport1 for its viewport and then you would need to update the sprite for correct position and graphics.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top