enemy

  1. Gorshalox

    How to make enemy(walking,attack)

    I'm making ma first game(2d platformer) in GMS language,i don't know how to make enemy to walk to player and attack him,pls help me
  2. xS89Deepx

    Zombie spawner

    I'm making a zombie game and zombie only spawns in 4 directions, check the image below... //here my code for zombie spawns obj_zombie_spawner create event - alarm[0] = 100; global.level = 0; alarm[0] event - if (instance_number(obj_zombie) < 3) { repeat (1 + global.level) {...
  3. F

    How to avoid the respawn of the enemies when I re-enter the room

    Game maker 1.4: I put an enemy in the room, but even when I kill him, when I enter again in that same room, he spawn again with the full life. How can I avoid the enemies that had already dead of spawn again?
  4. P

    Making Enemy Shoot at Player

    Hi. I'm using Drag and Drop and am new to coding so I'm having some trouble with this. I've created an enemy called obj_enemy_dropper that that bounces off walls. I've tried looking through tons of threads and watch countless videos but I can't seem to find out how to make the bullet shoot at...
  5. lluuze

    Hitboxes + Enemy Parent Issue

    Hello all, I've been experiencing some problems with the hitboxes and enemy parent. Once the player's character collides with the enemy, they become stuck but before I made changes to the player's sprite; everything was fine and working. I recently switched back to the original sprite to fix...
  6. 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;
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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!
  17. 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...
  18. 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...
  19. 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!
  20. M

    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?
Top