• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

enemy

  1. D

    GML [SOLVED] I need help. I can't figure out what's wrong with my AI!

    I have two kinds of enemies: shooters and chasers. I'm trying to write a script that lets the shooters shoot the chasers, the chasers get mad, they run after the shooter and kill it. But it gives me an error that says that my target variable is undefined, even if I reset the target to the player...
  2. O

    Legacy GM Making Enemy Follow Player if it's in their Field of View

    So I want obj_enemy to follow obj_player (If it can see it with no walls inbetween) avoiding obj_walls. This is what I have as a code: On the obj_control create event: global.grid=mp_grid_create(0,0,room_width/32,room_height/32,32,32); On the obj_enemy create event: global.path=path_add(); On...
  3. T

    Windows Want to make enemy that splits after death.

    So, I already have death of my enemy but I want to make him split. If anyone could help me, it would be great. My code for death: if health_ <= 0 { instance_destroy(); }
  4. D

    [SOLVED] Referencing Specific ID of Object in Fast Collision

    I have 3 enemies in the room. When I kill one of them, they ALL die. In my bullet End Step event, I check a collision line for fast bullet collision. My goal, I presume, is to decrease the "hp" variable of the specific ID of the enemy object that the bullet is colliding with. I've done some...
  5. J

    Define specific object when multiple instances of same object exist

    I am working on an enemy that I want to shoot a laser beam from itself to the player, which im doing using the draw event. I have the laser with the draw event as a different object that is created in the enemy object. The laser object draws a line from the enemy.x/y to the player x/y, but I...
  6. V

    RPG first person enemy spawn fight

    Hey there!! Sort of having trouble on making a first person dungeon crawler game. Basically I want to make my enemy spawn in front of the player as in these games but having trouble calling out the enemies to appear or even switch to a scene of a new area with a better background but random...
  7. J

    Stop physics object moving after reaching certain point

    I have an enemy that Is moving towards a randomly generated point above the player, but I cant seem to get it to stop when reaching the destination point (the object does stop, but it still tries to move causing the sprite to twitch, which is the actual problem here) here is the movement code...
  8. H

    Which Data Structure to use?

    So i am about to make an endless going highscore game. And there will be random enemys that will come at a certain time every time. from time to time the enemys being changed and getting harder. Can someone explain me how i can make this happen? Is a Data structure necessery?
  9. A

    Bullets shooting too fast - would like time between each bullet

    Hello, I would like my player to shoot knifes at an enemy and I am able to do that but I would like them to go slower and for there to a certain amount of time before you can shoot another knife so they aren't all so close together. This is the code I currently have: bullet =...
  10. B

    How to make the enemies spawn after? (Experts)

    How to make the enemies spawn after 8 seconds of the game starting, not right away?
  11. A

    GML Enemy AI (Enemy Attack State) How would I code that? [SOLVED]

    How would I do if I wanted my enemy to come close, and then initiate the attack animation and create a hitbox in front of him? I have a state, but it's really glitchy. if (en_state == 0) { if (distance_to_object(obj_player) < 20) { state = 1 sprite_index = spr_forestspirit_atk...
  12. D

    GameMaker Help please my enemy wont move!?!

    I have spent the last week staring at my code for my enemy. all i want the enemy to do is move to the side when it collides with the wall it goes backwards. i have tried to look it up but to no luck. someone please help me i am only a beginner at coding. here is my code for my enemy //step...
  13. Y

    Legacy GM enemies don't turn right away (SOLVED)

    so I have enemies that move along a grid as they follow the path to the player. I have make them change sprites if their direction changes but for some reason it always takes like 2 seconds before the sprites are the good ones here is the code: ///movement if( direction = 0){ sprite_index...
  14. D

    Windows enemy wont work

    I am a beginner coder for this program so i must have messed up somewhere. I am trying to get a block enemy to move back and forth but they keep glitching out at a wall or where they spawned. here is my code so you guys can help me find out what i messed up. this is my step event. if...
  15. TheOnlyWRT

    Enemy Movement

    Hey guys, so I am trying to implement some enemy movement depending on whether the player is close or not, and I cant get it to work as i would like, and frankly i have run out of ideas on how to implement this. Basically, i need the enemy to move towards the closest "cover" (a crate) between...
  16. H

    Legacy GM Making a The Legend of Zelda Tektite Enemy

    Hi! I'm trying to recreate the "Tektite" enemy from The Legend of Zelda in Game Maker Studio. I've tried for quite a while now but I can't really get it to work. Tektites are the spider-like enemies in Zelda, and they jump around randomly, and sometimes towards the player, often in groups...
  17. H

    Enemies clipping through walls to the north and west

    Hi! I am having some issues with my enemies. They keep clipping through the bottom and right sides of blocks, but not left or top sides. This was not an issue yesterday, but I have made many changes since then and I would rather not go back to that version. I have searched through both versions...
  18. M

    [SOLVED] Make turret dont shoot if obj_solid is blocking

    The player has an ability to summon a drone and help him, what the drone does is shoot to enemies and follow the player. Everything works perfect but it has something that i don't like... If the drone see's an enemy it stars shooting, when killed it stop, but it even shoot to enemies that are...
  19. B

    Legacy GM [SOLVED] Weapon's barrel face the moving enemy

    Hey guys,in game maker i've created a weapon and an enemy objecct and i want the weapon to face the moving enemy,so basically i want the weapon's barrel to face the enemy. I have tried it with this code: if(instance_nearest(x, y, obj_enemy)) { image_angle = point_direction(x, y...
  20. R

    GameMaker Manhunt-esque A.I. Help

    Once again, I am having trouble with something. This is more... concept than code. I'm looking for an answer, describing what I could do. Many of you may know of an infamous game by Rockstar, Manhunt. Manhunt is a stealth game, in which you must hide in the shadows and try to catch your...
Top