Game Maker Tutorial – Intermediate Enemy AI

[ad_1]
Brand new 2017 Game Maker Studio: 2 Course available right now

Game Maker Tutorial Intermediate Enemy AI

In this video we look at creating basic intermediate AI. This is our first look at programming something pretty cool that you can change settings with. If you have any questions then be sure to leave a comment or contact me on twitter; realtutsgml. If you learned something then be sure to leave a like, comment, favorite and maybe even a share.

Have you ever wanted to create games? Have you ever gotten fed up with it being to difficult? Well now is the time to thank me and possibly subscribe because you have just found the channel for you! Game Maker Tutorials, Java Game Programming, Unity3D Tutorials, Batch, C++ and much much more! This is the channel for you, the one stop shop for an exploration of your hidden talent as a game developer. Unleash your potential and go wild with imagination when you finally figure out how to make any game you want!

Visit CodingMadeSimple for more exclusive tutorials and get the help you need to succeed as your very own indie game developer!

Follow me on twitter for exclusive content and interaction with me!

Game Maker Studio: Programming
Game Maker Studio: Tutorial
Java Programming
Game Programming
Game Tutorial
Programming Tutorial


Posted

in

by

Tags:

Comments

21 responses to “Game Maker Tutorial – Intermediate Enemy AI”

  1. Çağrı Şengül Avatar

    my enemies doesnt move at all with this code i dont know why

  2. Crazydog 330 Avatar

    i watched 2 hour long videos on how to make enemy ai, and then i find this one just 8 mins long that shows how to do it just fine

  3. MI7QC Avatar

    i am on game maker studio and the code is not the same, I CANT write

    mp_potential_step(Obj_sam.x,Obj_sam.y,2,0) =error

    if alert = 1
    {
    if distance_to_object(Obj_sam) > 75
    {
    alert = 0
    }
    mp_potential_step_object (Obj_sam.x,Obj_sam.y,2,0)
    }
    else
    {
    if distance_to_object(Obj_sam) < 50
    {
    alert = 1
    }
    }

    and the result is dont work

  4. Gamsa Avatar

    how do you make the FOV larger for the enemy to make it harder?

  5. Charles Coquelle Avatar

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Step Event0
    for object m_chant_sdt:

    Push :: Execution Error – Variable Get 100050.obj_player(100001, -2147483648)
    at gml_Object_m_chant_sdt_StepNormalEvent_1 (line 11) – if distance_to_object(obj_player) < 50
    ############################################################################################

    help me seeeeempai (sry i posted twice on another video)

  6. agge blue Avatar

    I'm trying to do everything in code, no complain!! But this is almost PERFECT tho for me! 🙂

  7. Insatiable Chaos Avatar

    I'm making a top down zombie shooter. I want to make an ncp that shoots at the closest enemy

  8. GamerKingNation Avatar

    ? where is the code in description?

  9. Ellis Avatar

    dose not work
    i cry

  10. Justin spice Avatar

    AMAZING DUDE!!! love the light code for a noob like meee!

  11. jonfishmacon Avatar

    if my player dies or i change his obj to a ship  to fly away
    game crash  🙁

    FATAL ERROR in
    action number 1
    of  Step Event0
    for object o_bad1:

    Unable to find any instance for object index '36'
     at gml_Object_o_bad1_StepNormalEvent_1 (line 10) – mp_potential_step (o_hero.x,o_hero.y,2,0)

  12. GUMIDEK cz Avatar

    this is not for studio. is it ?

  13. Zimar Manigault Avatar

    Awesome! Thanks for the vid, really helped my game. Looking forward to more of your tutorials…

  14. Tim Silverpanda Avatar

    Thanks for tips, it seem to work fine, now I only have to fix so that the sprites changes correctly with the random direction – since my enemies arent just balls. 

    Is there any such thing as "last/current direction"  so for example if the random selects "straight right" does it give some kind of value to the object that I can use as something along the lines of "if  X= "straight right value" image_index = enemy_walkling_right_sprite. 

  15. keyboard warrior Avatar

    help! everytime i load the game this pops up everytime!:
    error in action number two of create event for object enemy
    error in expression:random position: 1:unknown variable random

  16. Dean Adante Avatar

    Please help I did everything this guy did but when I play it, whenever my guy gets close to the enemy, the enemy won't chase me. It just keeps going to wherever it's going and then sticks to the wall instead of bouncing off.

  17. spuddie Avatar

    Why does no one challenge themselves to not use drag 'n' drop. GML is pretty easy to learn and will help people move on to more complex coding languages.

  18. Furtha More Avatar

    if alert = 1
     { 
       if distance_to_object(obj_player) > 75
        {
          alert = 0
        }

       mp_potential_step(obj_player.x,obj_player.y,2,0)
     }
    else
    {
      if distance_to_object(obj_player) <50
       {
         alert = 1
       }
    }

    I did you all a favor
         

Leave a Reply

Your email address will not be published. Required fields are marked *