[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 - Ігри
Thank you so much! I had been working on this for a week and your video finally helped me out!
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!
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!
Thank you for the tutorial,very helpful indeed. Will be watching all the tutorials you make,again thanks.
Thank you so much for the kind words. :P
I played your game. It was awesome!!! :D
Great tutorial, thanks!
very good video man! thanks
Dude, you saved so hard TY
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!!
Awesome tutorial bro! :)
Thanks Felix! :D
youre a lifesaver.
Really helped me alot :D
THANK YOU!!!
Thank you!
Thanks!
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?
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?
thanks man
thank you so muuuch i love u
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?
thanks!
what if you want to add a sprite with animation? how you can do that?
Hi, is there any way to count the number of clicks and draw it with the drawGUI event?
Got a poll for you guys, trying to plan the next few months. :)
strawpoll.me/3502197
+Aerion can you please do a video on isometric collision checking?
I'm really having a hard time working out what to do
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?
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
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
Nice job, but you'll notice that in diablo, the sprites change depending on what direction they're going. How do you code that?
How do I make it so that the object collides with objects?
How can we set a movement distance limit to this.
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?
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 ^^
How i can make my player walk in a custom speed?
could you put up a tutorial on how to make this style of movement work with a physics enabled room and objects?
Did you happen to figure out how to make this work??
Sometimes, the mouseClick object comes to the player. How do I fix this?
Now how doi make the player face where he is going?
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.
same here. did you figure it out?
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!!!!!!!
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
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
Hey, I'm having the same problem. Did you ever figure this out?
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
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
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;
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/
how do i make it so it does change sprites when it moves
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 ;
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
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
Thanks and I love your videos keep up the good work
Thanks Blockmaster! That means a lot. :D
how the hell did you learn to use all those codes? like guides or something?
jose.e vl Just take your time and learn the statements and what they do. Guides help to get this knowledge.
lol that arrow! well at least you can tell it's an arrow! ;)
Yeah...art isn't my thing...
lol, well art wont do anything if you don't know how to program so who cares about the art, lol. ;)
ugh how do i get my character to walk he only slides across the ground D:
Make a moving sprite
luchalibri Make a walking Animation.
KEKW
It says you are playing diablo lol
Thank you!
Thanks!
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.