enemy

  1. D

    GML Top Down Shooter Enemy

    I am making a top down shooter bomb disposal game. I have created an enemy object and would like it to be able to detect the player object - 'Player' - within a certain radius, move towards the player's position and when close enough enact a sprite change to 'Enemy_melee' to play the attack...
  2. K

    When i hit one enemy, all of them die....

    Hello everyone i have this problem when i hit enemy all of them die... i am trying for 5 days to make it work and i am starting to be frustrated :) I am also new here so i dont know if i can just post my code here but i will do it bcs am loosing all my hope. this is my attack script=...
  3. C

    How to shoot the closest enemy

    hi i am making a top down base defense game. i'm gonna have 4 computer controlled towers that fire at enemies automatically. I've managed to get them to shoot the enemy and destroy it but they all target the same enemy (Video), i want them to target the closest enemy to them (i dont want to have...
  4. C

    GML Enemy attacking from behind

    Well, I've been trying to create a system where the enemy follows the player at a certain distance, but this distance is rounded to positive (always) which makes him attack even from behind! I know what the problem is, but I don't know how to solve it, can you help me? Thank you very much...
  5. M

    Smoother Pathfinding?

    I have this code for pathfinding: enemy: path_delete(path) path = path_add(); targetx = obj_jugador.x; targety = obj_jugador.y; mp_grid_path(obj_pathfinding.grid, path, x, y, targetx, targety, true); path_start(path, spd, path_action_stop, true); alarm_set(0, random_range(30, 120))...
  6. janot_

    need help making ai pathfinding

    i need help making enemy ai pathfinding on a top down game, that´s it
  7. P

    sequences for enemy death animation (not destroying frames)

    I am new to game maker and coding. apologies for looking embarrassingly silly on here Here's a short video of my dilemma. my end result I want my enemy death animation to use one of my sequences instead of the original sprite death animation I created. As you can see its not deleting frames...
  8. R

    SOLVED Game Crash

    Hi everyone, I need help optimizing my code in my game. Lately I've been refining my code and putting some things in the game to make it look nice, but I'm having a problem with the game crashing. (I'll post the code for better understanding): if(place_meeting(x,y,obj_inimigo_parent)) { var...
  9. Z

    Enemies follow more than one target

    Beginner - I'm trying to create a code that makes enemies follow the nearest target, there may be several on the map. Practically a barrier system that will allow my character to defend himself. I can't think of anything, if anyone has any suggestions I'd appreciate it . Image: I would like the...
  10. B

    SOLVED The death animation of my enemies doesn`t work in the first, but in the second room. Why?

    Hello everybody, I am new to gamemaker and programming in general. My Gamemaker version is v2022.6.0.23 I am following Shauwn Spaldings tutorial and everything is working fine... ...Exept the death animation of my enemies. The moment I create...
  11. Kleff

    GameMaker mp_potential_step

    I have a small problem with collision and mp_potential_step if I push the enemy back , then the enemy gets stuck in another enemy and they don't move anymore Is it possibility that enemy push back other enemys like a chain reaction with many enemys ? I make this here without...
  12. D

    SOLVED Duplicated enemy with different name doesnt work

    Hello, so i have problem with creating new enemy i duplicated my least enemy and just renamed it and it doesnt work. objfly = enemy objhrac = player obj_enemy collision with obj_player lives -= 1; var near = instance_nearest(other.x,other.y,objcheck); other.x = near.x; other.y = near.y...
  13. AnnoyingDoggoX

    Off-screen Enemy Indication

    An arrow or indicator that shows the location of off-screen enemies which is around the edge of the camera. I would like this to not be drawn, because I'd like to use an object for the indicator. I have an object for this enemy, and there is only 1, but I think maybe solving the problem for...
  14. L

    SOLVED - Randomly generated objects have no collision

    Hey, In my game I have these enemy's that have this simple ai grid pathfinding that I used from this itch.io page. https://randatabase.itch.io/simple-ai-grid-pathfinding It does what it's supposed to do but I have a little problem. I have this system where is randomly spawns a certain amount...
  15. E

    GML How could I make enemies spawn on the right side of the game screen?

    Hey all! This is my first time using GML so I am not too great at it and I need a little help. I am currently working on a 2D side scrolling shooter. I am trying to make enemies/entities spawn on the right side of the screen but I'm having some trouble. I have looked at a lot of videos and...
  16. philipIII

    SOLVED Help with the creation of an obj

    Hey! I want to place an enemy in each floor of the room, here's my script (i'm kinda new so it's a simple script): ///@arg collision ///@arg obj function random_platform() { var collision = argument0; if instance_exists(collision) { instance_create_layer(collision.x +...
  17. R

    Enemy AI

    Hi everyone I am trying to get my enemies to show an alert pop like metal gear solid. My main issue is that the alarm that I am using is never actually starting because its in the step event and keeps on looping. I've tried to look it up something like that. here is some of the code ///Step if...
  18. R

    Code only works on first enemy created

    Hi everyone, I've got a bit stuck on an issue. I have my music change when in a certain radius of an enemy. However it only seems to work on the first instance of the enemy that was created. Any idea why it only works on one enemy? Big thankyou in advance for any help. EDIT: Also worth pointing...
  19. JasonTomLee

    Asset - Graphics Slime Platformer animations

    A set of Slime animations for your platformer games! Many more animations, effects and sound effects will be added. Check out the main Itch.io page for updates. Download directly through Gamemaker Enjoy!
  20. R

    smarter enemy

    hello guys, I came to ask for help with a code, how I could get the result I want. I'm trying to make an enemy who can walk the map but, he recognizes obstacles along the way and try to "dodge" or go the other way. I tried to use collision_line or point_distance to see if I could but without...
Top