[Game Maker] Click To Move Tutorial - MOBA/Diablo Style Movement

Поділитися
Вставка
  • Опубліковано 3 сер 2024
  • NEW 2021 GAME MAKER COURSE: gamemakerguide.carrd.co Today we go over adding click to move into your game so your player moves via mouse click and not keyboard check!
    -----------------------------------------------------------------------------------------
    Play my game "You Complete Me":
    gamejolt.com/games/platformer/...
    -----------------------------------------------------------------------------------------
    Website: www.aeriongames.com
    Facebook: / aeriongames
  • Ігри

КОМЕНТАРІ • 75

  • @MedeivalWarfare
    @MedeivalWarfare 5 років тому +3

    Thank you so much! I had been working on this for a week and your video finally helped me out!

  • @ZillaBlitz
    @ZillaBlitz 7 років тому

    Thanks for posting this. It worked perfectly for what we're trying to do in a GameMaker geocaching game. Really easy to implement, much appreciated!

  • @nickleeb336
    @nickleeb336 8 років тому

    I know I'm super late, but this was helpful - thank you. I'm new to game maker, and I've done a few projects, but never any 'click to move' so I had completely no clue how to even start. Thanks!

  • @anyhonywilliams6160
    @anyhonywilliams6160 9 років тому

    Thank you for the tutorial,very helpful indeed. Will be watching all the tutorials you make,again thanks.

    • @aeriongames
      @aeriongames  9 років тому

      Thank you so much for the kind words. :P

  • @v3n0m3r8
    @v3n0m3r8 8 років тому

    I played your game. It was awesome!!! :D

  • @asgmusic1776
    @asgmusic1776 7 років тому

    Great tutorial, thanks!

  • @sestalacto
    @sestalacto 8 років тому

    very good video man! thanks

  • @MrLuizpls
    @MrLuizpls 5 років тому

    Dude, you saved so hard TY

  • @GurkiratSingh-rd1yt
    @GurkiratSingh-rd1yt 5 років тому +1

    Thank you bro! I helped a lot!
    But also, can you please tell me what should I do if I want to move multiple objects in the same room using the mouse click (but only one object per time)?
    Thank you very much bro!!

  • @danskegmstuts
    @danskegmstuts 9 років тому +1

    Awesome tutorial bro! :)

  • @BlackieSootfur
    @BlackieSootfur 4 роки тому

    youre a lifesaver.

  • @mathiaspetersen4328
    @mathiaspetersen4328 8 років тому

    Really helped me alot :D

  • @MattJohno2
    @MattJohno2 7 років тому

    THANK YOU!!!

  • @aggeblue8136
    @aggeblue8136 9 років тому

    Thank you!

  • @OFFICALMENOFCULTURE
    @OFFICALMENOFCULTURE 3 роки тому

    Thanks!

  • @WrenchxI
    @WrenchxI 7 років тому +1

    Hello! I like your video really much! But i need help to something.
    Can you plz make a animation with cursor? I mean if you click left your character will facing left?

  • @whiterosefullstop
    @whiterosefullstop 7 років тому

    hey thanks for the vid. got it all working alright. my object even points to the mouseclick. however. as soon as it reaches the mouseclick my player rotation changes. how would you prevent the rotation from changing after it reaches the mouse click?

  • @premiumfurry6113
    @premiumfurry6113 9 років тому

    thanks man

  • @Leandro-xk3co
    @Leandro-xk3co Рік тому

    thank you so muuuch i love u

  • @GoofieRider
    @GoofieRider 7 років тому +1

    What I think most people want like myself isn't how to move to a mouse click point but how to move there avoiding walls etc and going round things and taking logical routs to get to destinations. Do you know anything about that?

  • @Keziah2101
    @Keziah2101 6 років тому

    thanks!

  • @caitriaworldanimations8999
    @caitriaworldanimations8999 6 років тому

    what if you want to add a sprite with animation? how you can do that?

  • @asdasdasdderp
    @asdasdasdderp 8 років тому

    Hi, is there any way to count the number of clicks and draw it with the drawGUI event?

  • @aeriongames
    @aeriongames  9 років тому +2

    Got a poll for you guys, trying to plan the next few months. :)
    strawpoll.me/3502197

    • @asumjessen2013
      @asumjessen2013 8 років тому

      +Aerion can you please do a video on isometric collision checking?
      I'm really having a hard time working out what to do

  • @realwintermute
    @realwintermute 3 роки тому

    Thanks so much for this, I do have one question though. I'm still having physics issues ie: my player runs through walls. Does anyone know a solution?

  • @jollop
    @jollop 8 років тому

    I've got a 2d point and click adventure but I don't know how to make it so the player stays on the ground

  • @panhero72495
    @panhero72495 9 років тому

    Sorry it's been a month or two but I just can't get this right how do I make my character turn towards my cursor I only want to go left and right

  • @LANCASTER_Official
    @LANCASTER_Official 4 роки тому

    Nice job, but you'll notice that in diablo, the sprites change depending on what direction they're going. How do you code that?

  • @MissTomi
    @MissTomi 5 років тому

    How do I make it so that the object collides with objects?

  • @janethiggins9438
    @janethiggins9438 7 років тому

    How can we set a movement distance limit to this.

  • @pitiponk1
    @pitiponk1 8 років тому

    Hi, thank you very much for this ^^
    I have a question though:
    I want to make a slow movement with heavy steps kind of like a mecha. How would be the best way to change that "4" in "move_towards_point (obj_mouseClick.x,obj_mouseClick.y,min(4,mouseDistance));" to do it?
    I guess I would have to change the 4 to a new variable and then use an alarm to make the player accelerate slowly and then stop sharply over a second or so then repeat until obj_mouseClick is reached , but I have no idea how to tackle this (noob at code :D). any thoughts?

    • @pitiponk1
      @pitiponk1 8 років тому

      I spent well too long too late to figure out this lol, I was actually extatic that the thing did what I wanted it to (kinda), the rotation doesn't feel really good though ^^

  •  5 років тому

    How i can make my player walk in a custom speed?

  • @jordenkullos9283
    @jordenkullos9283 8 років тому

    could you put up a tutorial on how to make this style of movement work with a physics enabled room and objects?

    • @nickleeb336
      @nickleeb336 8 років тому

      Did you happen to figure out how to make this work??

  • @gabennewell5473
    @gabennewell5473 7 років тому

    Sometimes, the mouseClick object comes to the player. How do I fix this?

  • @OFFICALMENOFCULTURE
    @OFFICALMENOFCULTURE 3 роки тому

    Now how doi make the player face where he is going?

  • @fallingnao3919
    @fallingnao3919 8 років тому

    Is it possible to use that mouse movement with physics added? once i've selected room is a physic world, the mouseClick never shows nor players moves towards the direction.

  • @TheJyrish
    @TheJyrish 9 років тому +1

    The Number one thing that I would LOVE if you could put a video for...cuz there is nothing like it on the net, would be if you could just add a 3/4 view character sprite to this tutorial and explain how you would get it to walk toward the mouse....Think Diablo, or league of legends. I would even settle for juat a reply. There a re so many videos that show..hey we can do diablo movement but they never do it with a character at that angle.they always use a box or circle sprite. THAT ONLY WORKS FOR TOP DOWN view games, Wheres the 3/4 view!!!!!!!

    • @MrSkaterdrew
      @MrSkaterdrew 9 років тому

      Most likely because it is either too much work or too hard to do in a 2d game engine and people are more inclined to do that in a game engine like unity or unreal engine

  • @lukasfreckmann484
    @lukasfreckmann484 5 років тому

    Hey! I have a question... I want to make walls and when the player collides with the walls he stops. I can’t figure out how I should do this with point and click. And im a noob so sorry for that.
    Greetings from Switzerland

    • @realwintermute
      @realwintermute 3 роки тому

      Hey, I'm having the same problem. Did you ever figure this out?

  • @TheBoriiiing
    @TheBoriiiing 7 років тому

    im running this same exact code and it works great ive been going crazy on how to get the sprite_index to change when going in different directions someone anyone please help ne add this line of code. thank you from the bottom of my heart

  • @Rickenization
    @Rickenization 7 років тому

    please could you explain how to left click on an object to move to it and then start attacking automaticly. like diablo does for its attacking gameplay? ive been trying gor four days now and i cant figure it out :( ive asked on loads of youtube videos and forums but no one seems to know. please help

    • @Rickenization
      @Rickenization 7 років тому

      ive got it so if you hold the mouse button down over an object the player will move to it but i want to be able to just click once...
      ///Attaking Engine
      if position_meeting(mouse_x, mouse_y, obj_enemy) and (mouse_check_button(mb_left)) {
      instance_deactivate_object (obj_path)
      instance_deactivate_object (obj_set_path)
      if point_distance(x, y, obj_enemy.x, obj_enemy.y) > 20
      action_potential_step(obj_enemy.x, obj_enemy.y, 3, 0)}
      else speed = 0;

    • @Rickenization
      @Rickenization 7 років тому

      if you would like to see the project you can download it off the game maker forums...gamemakersforums.com/threads/moving-an-object-to-another-moving-object.1233/

  • @gamsa7220
    @gamsa7220 7 років тому

    how do i make it so it does change sprites when it moves

    • @jelanistowers6504
      @jelanistowers6504 7 років тому

      Gamsa I know this is late, but you could set if statements for hspeed and vspeed. Then set a sprite_index for those statements. Like this : If (vspeed > 0 && hspeed > 0) Sprite_index=spr_northeast ;

  • @wizbuizz1263
    @wizbuizz1263 9 років тому +2

    I have a suggestion for a next tutorial maybe a wizard fighting game or rpg with spells and stuff it's just a suggestion but it would be cool

    • @aeriongames
      @aeriongames  9 років тому +1

      I actually thought about doing a series like that! Thanks for the suggestion. Only thing is that Heartbeast is doing a 'Magic RPG' series and I don't really want to conflict with that. If everyone makes different tutorials that allows for even more stuff to be taught! I will definitely look into it though! :P

    • @wizbuizz1263
      @wizbuizz1263 9 років тому +1

      Thanks and I love your videos keep up the good work

    • @aeriongames
      @aeriongames  9 років тому +1

      Thanks Blockmaster! That means a lot. :D

  • @joseevl-wn6yf
    @joseevl-wn6yf 7 років тому

    how the hell did you learn to use all those codes? like guides or something?

    • @blzy2305
      @blzy2305 6 років тому

      jose.e vl Just take your time and learn the statements and what they do. Guides help to get this knowledge.

  • @ViralityG
    @ViralityG 9 років тому

    lol that arrow! well at least you can tell it's an arrow! ;)

    • @aeriongames
      @aeriongames  9 років тому

      Yeah...art isn't my thing...

    • @ViralityG
      @ViralityG 9 років тому

      lol, well art wont do anything if you don't know how to program so who cares about the art, lol. ;)

  • @panhero72495
    @panhero72495 9 років тому

    ugh how do i get my character to walk he only slides across the ground D:

    • @nlcaspernl
      @nlcaspernl 9 років тому

      Make a moving sprite

    • @blzy2305
      @blzy2305 6 років тому

      luchalibri Make a walking Animation.

  • @atmegaphil
    @atmegaphil 3 роки тому

    KEKW

  • @josharpe
    @josharpe 7 років тому

    It says you are playing diablo lol

  • @veraspiridonakou5742
    @veraspiridonakou5742 7 років тому

    Thank you!

  • @Feynman.R
    @Feynman.R 6 років тому

    Thanks!

  • @ameteuraspirant
    @ameteuraspirant 6 років тому

    yeah but it doesn't show how to do collision. if I wrap this in a !place_meeting then it breaks as soon as it touches the wall and never works again until I reset it.