enemies

  1. A

    SOLVED setting a enemies scale according to distance

    hello so i am making a game and i need to make enemies scale according to their Y cord (like higher Ycord less scale and moreYcord less scale) and they spawn in random y positions so i cant just use if vspeed>0{vspeed+=0.10} if vspeed<0{vspeed-=0.10} please help
  2. samspade

    GMS 2.3+ Let's Make Some Enemies

    GM Version: 2.3.1 Target Platform: All Download: Github Repo Links: YouTube Playlist Summary: A GML tutorial series on (you guessed it) making some enemies (in code, not real life). In the introduction video I go over the general series idea as well as some basic project set up. And tutorials...
  3. Reyniki

    GMS 2 Platformer Enemies Spazz out on top of Player [SOLVED!]

    [EDIT] My previous concern was solved but now I'm kinda lost on how to make the enemy sprites stop spazzing out when they're overlapping with the player. Dunno if any line of code would show the problem but here's the enemy's chase after the player code: dir = sign(oPlayer.x - x); h_sp = dir *...
  4. Elkrom

    GMS 2 help with enemy attack state!!

    having multiple issues with this code, at first glance when i started the room it seemed like it was working until i realized that if i was to the left of the enemy they would run away from me rather than at me , and if i came in contact with the enemy i got this fatal error. "unable to find any...
  5. Z

    Boomerang like effect

    I have been working on a flying enemy that swerves back and forth and often times changes its elevation I have to code it the best of my abilities but the sprites themselves just vanish into thin air. It is hard to put it into words so I have a video to give general idea i am trying to aim for...
  6. Skoplir

    GMS 2 [SOLVED] Handling enemy collisions with weapons

    I understand how an enemy being damaged would normally be handled: If enemy collides with object, reduce enemy's health based on the object's damage value. (or something close to that) But what if there is a large number of weapons and a large number of enemies? Is the enemy/weapon object...
  7. Enes

    GMS 2 Enemies either move very right or spawn only one exemplar

    okay, everyone...I came to a conclusion: whenever I add the "Add some enemies" just below the section where the walls of the grid are created, then the enemy starts to follow the player but it only spawns one examplar....however, if add the "Add some enemies" just below the section where the...
  8. S

    GMS 2 8 Direcctional Enemies help

    I have a fish sprite that I am trying to give 8 directional movement and then when the player gets close to it is faces the place and begins to move towards the player, finally when it is really close it starts its attack animation until it is further away. I will post the code I have so far...
  9. G

    How do i make an enemy tower?

    Me... again.. I am completely lost on how to program stackable enemies. I want to be able to stack my enemies, similar to how goombas stack in Mario. Where they all move as one tower of enemies. I'm using drag and drop to make my platforming game, and i tried looking for this information online...
  10. Divinik

    GML Enemy/Companion Obstacle Maneuvering Without Paths?

    So with my enemies/companions in the game I'm making (3/4 top down), I'm trying to figure out how to have them maneuver around around walls without paths when one is between the object and the player. The code i have now is: if !collision_line(x,y,player.x,player.y,obj_wall,false,false) {...
  11. W

    GML Creating a (sort-of) Typing Game Mechanic

    Not necessarily a typing mechanic, but one that works similarly. I'd like to create a game in which you deal damage by providing the requested inputs that appear above enemies. Instead of typing out words as one would in an actual typing game, the player would use only two inputs (for example...
  12. E

    Enemies when chasing player jitter and shake.

    When i make an enemy code that follows the player the enemy jitters for some reason. Nothing fixes the problem. Here's my code: spd = (point_distance(x,y,obj_player.x,obj_player.y)/100); move_towards_point(obj_player.x,obj_player.y,spd);
  13. Architheutis

    Path-Chaos: One character, different pathes/room - goes wrong!

    Hi guys. I´ve remarked it at different sites of my game: Some of my created enemies (manually droped down to patrolling-pathes, each one has its own path) seem to reappear in another rooms. I used one sprite (object) for several needs (different pathes in different rooms). For example I gave a...
  14. KPJ

    GMS 2 get all enemies within a range (GMS2) (SOLVED)

    Hi everyone! Does anyone know a simple way to get all the instances within a specific range? Because I have a game where I want all the enemies in a range of 100 to be in an "alert" state. How would I go about doing this? Thanks!
  15. L

    GMS 2 Respawning enemies and traps (outside of view_camera)

    What would be the best way to make objects (like enemies and traps) to respawn at their original position if destroyed/left behind AND left outside the view_camera? (like old school NES games). My current code works like it deactivates everything and activates everything within my view_camera...
  16. Z

    Horizontal Platforming knockback for shields

    Lately I have been having issues with implementing a knockback code for a particular type enemy that carries a shield and can only be attacked from behind. When performing an attack on the enemy's shield the player is suppose to be slightly pushed back from the strike. However, when implementing...
  17. M

    "collision_circle" Detecting The Same Object

    Hello everyone, I have a problem with the collision_circle function. I want to have 2 variables with 2 different enemy objects, but when I do that, it detects the same enemy object. Here is my code: first_enemy = collision_circle(x, y, 192, oEnemys, true, true); second_enemy =...
  18. M

    GMS 2 how to make floating enemies ?

    i just recently started using GMS2 and im trying to make a floating object but i can't figure out how to make it have wall collision and float at the same time. oh and tbh im a nood at coding just recently started on coding school so i don't know **** about coding. ¯\_(ツ)_/¯ (oh the game...
  19. B

     Cube Clicker

    This is my first game and I really enjoyed learning everything I did. My coding is not the best and some things may still not work as intended, but I really loved using GameMaker! I made this using a trial for a game jam and I'm trying to purchase a license of some sort soon. This game is a...
  20. M

    Enemy Shooting GLITCH

    Hey everyone, I made a nice enemy state machine for scouting and shooting. When it is in scouting mode it just moves around, but when it gets in shooting mode it starts to shoot in it's direction. The problem is when it sets back to the scouting state it continues to shoot while moving. Here is...
Top