1. K

    Making the enemy flips

    Hey, lately, I´ve been working on a game for a Game Jam, it´s a roguelike style game. I have my enemy, who just have one sprite turning to the left, and I would like to: Detect if the player is on his left or his right; And flip to the side where the player is;
  2. L

    Attack State

    I received this code error message after watching tutorials my college issued to me. I did take "calarvae_attack();" out and the game loaded however my enemies do not perform the attack animation as they are suppose to. How can I make the enemies attack the player back when approaching...
  3. KyleRansford

    GMS 2 How to do Conditional Destroy Functions

    Hello, I have a game where enemy objects can be destroyed in 2 different ways, but I'd like 2 different things to happen depending on how the enemy object was destroyed. For example, if an enemy object goes off of screen or out of room the enemy object is destroyed and the enemy objects can be...
  4. Z

    GML Trouble with Enemy Attack Sprite Manipulation

    I have just completed the wonderful GML2 Complete Platformer Tutorial series by Shaun Spalding on Youtube. The code is identical to how he set up his simple shooter, I have just changed the art and little details and values here and there, and everything works! However, my enemies do not have...
  5. Alaska Minds

    Easy Enemy AI (Idle, Chase, Attack, and Flee)

    GM Version: Studio (All) Target Platform: Any Download: None (Code below) Links: Example gif of the code below: https://alaskaminds.org/2020/02/11/game-maker-easy-enemy-ai-idle-chase-attack-and-flee/ Summary: Hello All! I'm going to show you how to create an enemy object that will Idle...
  6. sweep

    Enemy animation

    Hi ( I know this topic must have been brought up a thousand times before.) I am working on a top down game. I've been through the forum looking for a way to get the enemy to animate when chasing the player. I have the enemy sprites set up for 4 directional movement. I've tried tweaking the...
  7. shrunkenmaster

    [SOLVED] Help with ds_list to select random path without duplication

    I'm trying to work out how to place one enemy on each of the paths I have. I used a switch to select a path which works fine, but I can't figure out the ds_list to select 4 random, but different, numbers. Eventually I'll have more paths than instances. Very new to this, so any guidance would...
  8. Samples

    GML Enemy sound effect stack issue (simultaneous sound play) [solved]

    Hello I'm new to this account but not to this place lol anyways There is multiple enemies that are lined up. After a certain time, they open up, shoot, and play a sound. the issue is since they all are next to each other, and they all open up at the same time....the shot sound is...
  9. ruwcom

    Legacy GM [Solved] Health bar that works with different instances of the same obj?

    So I made a health bar object for the enemies of my project, when the enemy gets hit it creates a health bar in the room and it shows how their health points decrease while receiving damage, checking that info from the create event of the enemy. The problem is that, when I have multiple enemies...
  10. xilian7125

    GMS 2 enemy stops moving (again)

    when i walk over the enemy, they stop moving. everything else is functional code: vantoid_stomper step vsp+= grv; switch (state) { case ENEMYSTATE.FREE: EnemyState_Free(); break; case ENEMYSTATE.HIT: EnemyState_Hit(); break; case ENEMYSTATE.DEAD: EnemyState_Dead(); break; case...
  11. A

    Enemy Problems [SOLVED]

    So, I am trying to make it so everytime my player left clicks the enemy, it does damage, and thats working. except for the fact that everytime i click, it does damage to every enemy spawned, and im not sure how to fix that. if somebody could help please let me know!
  12. Jacob Thrasher

    Create dynamic "shadow" effect for a platformer

    Hello, I am working on an bird enemy for my platformer. The way I would like it to attack is as follows: The bird will be above the player's screen view, and casting a shadow on the ground. Once the player lands on that shadow the bird will follow him/her around for a couple seconds before...
  13. xilian7125

    GMS 2 (SOLVED) enemy stops moving

    hi there. there are many problems im having with the enemy but this is a big one when i touch the enemy, both the enemy AND the player get stuck. code: PLAYER: CREATE: hsp = 0; vsp = 0; grv = 0.4; walksp = 8; hp = 100 state = PLAYERSTATE.FREE hitbyattack = ds_list_create(); enum PLAYERSTATE...
  14. A

    Enemys Shooting At Me

    So I have a player that can shoot and i have enemys that randomly spawn, but i cant seem to get the enemys to shoot at me no matter what i do, if somebody could help me that would be great!
  15. MoncefFennich DZDev

    GMS 2 How Do I Make Enemy Never Stuck

    How Do I Make Enemy Never Stuck with Any Other Enemy Or Object When He Follow You. The Very Hard Think Is Avoid Enemy instance to another enemy instance. Any Advices?
  16. CrackedGamer§

    Game Mechanics Any ideas for a balancing system for enemies?

    So I need a multiplier for hp & damage dealt by enemies so that the game will always be a challenge. At the moment I feel like I want it to be skill based, so maybe "DmgDealt / DmgTaken"? I could use the levels of the player's weapons (swordlvl & knifelvl)? I ain't very good at balancing...
  17. LanderMiskolczi

    Legacy GM Game Freezes thanks to enemy Spawner

    So My game freezes, Idk if my game is stuck in a loop or something else, Can I have help? It only freezes when enemyCount is equal to 7 OB_SPAWNER Create /// Varabiles enemyCount = 0; ranX = 2; ranY = 2; Alarm[0] (Only has a comment) Step /// Spawn Enemys if (enemyCount <= 25) { if (alarm[0]...
  18. Jacob Thrasher

    What is the best way to handle many enemies?

    In a platformer I am working on I would like to have various types of enemies, each with different abilities. I am unsure of what is the best way to go about including them so that the code runs as quickly and as smoothly as possible. I have two things in mind: -Creating a unique enemy object...
  19. M

    GMS 2 enemy attack hitboxes, need help please

    I have made an enemy that attacks a player (with a spear) and i made a hitbox for it to allow for more precise dodging from the player. Problem is, when my player attacks the enemy and the enemy goes in to a stunned sprite the hitbox would still be there till the animation ended... i want this...
  20. BigCat

    How to check if a player is facing another...

    I'm building a top-down shooter. I have a target-A which basically sits in the center of the room I have ships which fly around the room in various formation patterns or whatever. The ships have laserbeams that fire directly forward. I want the ships, as they fly about the room - to check...