ai enemy

  1. A

    SOLVED enemy shooting cooldown

    hi imworking on an ai and i made the enemy shoot but i think u see ,it doesn t stop and i need a cool down here the code here it create the bullet , thougt of making that if the instance exist(i know the function) it will make the function false can you help me fixing ,thanks
  2. A

    SOLVED how to make enemy shot not toward the player but shut whene it clause and bettwen two angles

    hi i need do know how to make the enemy detecte if it s on the left or right of it and don t make that it shot derectly into the plr ( how to calculate angle)i got the bullet but i don t want theme to go toward to the plr it can just shoot left or right.please respant i m not good at programing
  3. A

    GMS 2 how to make enemy shot not toward the player but shut whene it clause and bettwen two angles

    hi i need do know how to make the enemy detecte if it s on the left or right of it and don t make that it shot derectly into the plr ( how to calculate angle)i got the bullet but i don t want theme to go toward to the plr it can just shoot left or right.
  4. A

    SOLVED how to make folowing enemy(i 've got a littel problem

    hello I m new here and i need help I m currently working at a project and im not good at programing and i m learning at a programing school and did a contest here i can win a better pc for my futur project I m trying to make a following enemy but i realise that i have4 objectplr(a normal,one...
  5. O

    Aggressive enemy AI?

    Hello! New-ish coder here, looking for some help creating/fiding some mild-super aggressive enemy AI. Im looking to have my enemy follow my player through obstacles (pits, jumps, ect) Any help is appreciated.
  6. 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...
  7. E


    I want the enemy ai to follow the player until the position it can hit but while the player is heading rights it works but unfortunately it doesn't function while heading left. here is my code: if State == enemyState.Playerseen{ if (can_see == true){ var lastPlayerPosition = inst.x...
  8. C

    GMS 2 Trying to make an object walk a path frowards and backwards indefinetly

    I am trying to make enemies walk a certain path forwards and backwards indefinetly when they are in patrol mode. I have tried setting the endaction to path_action_reverse but this only makes the enemy follow the path to the end, follow the path backwards, then follow half of the path forward...
  9. DarthTenebris

    Windows Enemy AI

    Hello everybody, I am currently trying to make my game's enemies, and I thought I'd start from the most basic enemy, a simple kamikaze enemy. Unfortunately it turns out it isn't as simple as I thought, particularly when it comes to their behavior. The circles are the enemies, the box on the...
  10. Rook

    GMS 2 Help with mp_grid and paths

    I'm making a stealth game where if the pursuer loses you they will return to the start and continue on their pre-set path I made via the path resource. Strangely though, before i was using if (abs(x - start_x) < 2 && abs(y - start_y) < 2) to return weather the enemy was at the start, which...
  11. Gamerev147

    GMS 2 Patrolling Enemy - Help!

    I've been trying to make an enemy that looks back and forth (using image_angle). So far I've just tried a few things limiting image_angle, but I can't seem to get it to work. Does anyone have some ideas on how I would program an enemy to simply look back and forth? If anyone needs more...
  12. D


    I'm relatively new to game maker and i'm running off of Gamemaker studio and i was wondering if anyone knew how to make 3D enemies in my game that move about and attack you in a wolfenstien 3D style (in code) Any help would be much appreciated (I have used...
  13. CrackedGamer§

    GMS 2 Enemy AI Help

    I need help with the enemy AI in a top-down game I am working on. I want them to collide with obj_solid and walk around it on collision. All code I have at the moment is: Create: enemyspd=5 spotted = false Step: //Pause After Attack if(place_meeting(x, y, obj_player)) { enemyspd = 0...
  14. K

    Enemy Pathfinding - Error

    Currently I am testing enemy path finding, however when the player moves to certain places on the map the enemy stops... I have no clue why The game -> If anyone could test it and figure out why is freezes it would be much appreciated! This is where
  15. Jmarlin3

    Unsure of operator issue

    I've been following the tutorial from Shaun Spaulding regarding Basic Artificial Intelligence He constantly uses state_text in this form state_text = ' ' ; He uses a different word to identify which script it's using. The problem is everytime I use it, I get this error: "unexpected unary...
  16. N

    Windows Enemies speed out of the level when using "move_towards_point" command

    Hi everyone , am having a problem with my enemy chase ai, i've used the tile collision code from heart beast's tile collision video and it's been working very well, i copied the player movement code and used it on my enemy object (took out the keyboard inputs ), but whenever i try to code in the...
  17. Z

    Help on creating multiple different enemies by one instance

    I want to place the same instance in one room but i want them to behave differently like one should use path1 and weapon 1 and other should use path 2 with weapon 2 so on. is there a way to make something like this? scripts, built in function like object id maybe. any better solutions will be...
  18. G

    GML [SOLVED] My Chaser Enemy goes crazy if i'm over him!

    Hi everyone!!! I'm new in Game Maker and coding in GML and i'm tryng to make an Hack & Slash Platform with Enemies starting in IDLE state, chasing if the Player is in a range and attacking him if he's in another closer range! My code works but when i'm on a ladder (so when the player is higher...
  19. N

    Code Problem A.I.

    Hi all, this is the part of my code inside the step event of the obj_bot that doesn't work. if instance_exists(obj_projectile) { // If there's a bulltet (projectile) on the screen with (obj_projectile) { // Run code from the particular bullet...
  20. Calyston00

    Windows mp_potential_step and physics

    Hi guys i got an enemy that i want him to follow the player if put it in a script. The enemy wander and if he near the player he chase him. I use the mp_potential_step but it's isnt working ! Does mp_potential_step work with physics since i use physic ? I've also tried to inlcude it rigth in...