ai enemy

  1. 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.
  2. 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...
  3. E

    GMS 2 NEED HELP WITH ENEMY AI

    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...
  4. Chupiperasaurio Studios

    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...
  5. 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...
  6. 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...
  7. 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...
  8. D

    3D ENEMIES

    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...
  9. 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...
  10. 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 -> https://ufile.io/k31da If anyone could test it and figure out why is freezes it would be much appreciated! This is where
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. Calyston00

    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...
  18. A

    GML [SOLVED]How do i set the ai to select one instance from multiple instances of the same object?

    I have a swarm of enemy ships. I want to make it so that after some amount of the ships are destroyed the swarm links up(all the ships stand behind one of the ship) and starts to charge a single ship so that it becomes more powerfull. How can i make gamemaker select one of the instances from...
  19. P

    How do i make an AI Enemy shoot at the player?

    How do i make an AI enemy shoot at the player? The AI enemy isn't suppose to move and only just shoot something at the player. I am new to Gamemaker so i don't really know much.
Top