AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() The easiest way is to add some events to the player object you created: In order to start testing if enemies are tracking and facing your player character you will need to add a way for your player to start moving around the map. ![]() You should have a room that looks like this now: Drag four instances of the enemy object created to surround the player instance in the middle of the room.Drag one instance of the player object just created to the middle of the room.Create two objects using the player sprite and enemy sprite you just created.Create two test sprites, one to represent the enemy units and another to represent the player unit, alternatively you can download the two sprites I made and import them into your game.Top Downįirst we need to setup a simple test room for a top down type game using the following parameters: The most important goal of this tutorial is not so much the code but rather the “why” and “how” the code is working in this way the lessons learned here can be reapplied in other situations and carried along as another tool in your developer utility belt. This tutorial will cover the Top Down type of game, where players and enemies are viewed from directly above as opposed to a Platformer that uses a side view each game type requires different ways of changing, tracking and facing the player unit so we will tackle them in separate posts. ![]() Making an Enemy unit face the player or even face a certain direction is a question that shows up on the GameMaker Community forums many times and is a fundamental function in creating any game that has enemy units no-one wants to see enemies looking the opposite way when they are coming after your player even though that is a rather funny scene to picture. GameMakerBlog Tutorials Top Down Game: Make an enemy unit face the player GM Version: GameMaker Studio 2
0 Comments
Read More
Leave a Reply. |