GameMaker How To Make Object Move Randomly
Вставка
- Опубліковано 7 гру 2014
- GameMaker tutorial / lesson that shows how to make objects move randomly throughout the room by turning every once and a while. Check out hundreds of other GameMaker tutorials and lessons at GameProgrammingCourse.com
All these gamemaker tutorials will work with Gamemaker Studio GMS or Gamemaker Studio 2 GMS.
Go to the Resource Page of www.gameprogrammingcourse.com to download the Project Files for these tutorials!
Wow this is way easier than I thought it would be lol, thank you!
Still worling in 2023. Thanks.
Well. Thanks for this video. It's the first time I see anything about this "alarm function", I'm already developing a game and had no plans to add that but now you made wanna add some elements with that alarm :D
thanks man you helped me with this problem i had all day. i did this by myself with the alarm system and this video showed me to make sure i reset the alarm system to play another 2 seconds so the action repeats after it has taken place! thanks babY!
1st of all : the quality of the video is awsome
2end of all : the video is so usefull
Mr Peace ikr this is great
THX SO MUCH THIS VIDEO AND THE RANDOMLY MOVE TOWARDS THAT PLAYER VIDEO HELPED OUT SO MUCH!!!!! :D
thank you so MUCH
yes this is what I wanted!
Thank you. This was more simple than using paths in my game. There's just a pause in the first seconds of launching the game before it actually does move randomly, any way to fix that?
You could place similar code in the CREATE event of the object to get it moving randomly right from the start.
hey...can i get some little info? i am making pacman in c++ using Winbgim... how can i create the ghost so that it will chase the player? can you help me out with the functions or ai i need?
i know this is old now, but for others: check google for a review of pac man ghost logic, you'll see how they code the different ghosts. Also, a bit more difficult (not beginner but intermediate level) you can learn about grids and shortest path solving. Then you can decide whether a ghost should take the shortest or not shortest path to the player or a path that leads to the left, right, up, down side of player. Great algorithms to learn about for gaming.
dude thanks i made a game thanks to you!! :)
+Omar And Leo Animations Good to hear. If you haven't, go through the entire course and start another one!
dude can you make a tutorial of how to make a 3d game please??
i know that you can make a 3d game right?
+Omar And Leo Animations You can make one, but Gamemaker isn't really that great for 3d. There are lots of tutorials on it so go hunt one down that has lots of thumbs up. It's not part of my class so I won't be making any 3d tutorials. Good luck!
but can you please make a tutorial of how to make a game even if its bad please
How do you make it decide how to pick one of two ways?
choose(direction one degree, direction two degree); instead of irandom();
and if you are making a top down shooter, you can put this in your step event :
image_angle = direction;
that works perfectly :)
Please answer as soon as possible, how do I make it so that what ever direction its moving in, it changes its sprite
either change the sprite every time you change directions ( sprite_index = sForward )
or in the step method ask a bunch of if statements that change the sprite depending on the direction
or if it is just the image angle you need changed then in the step method use image_angle=direction
Im confused, like really confused.
I cant really do that, when ever i try to do it it ends up like this
if (direction = 0)
{
sprite_index = spr_bull_right
speed = 2;
}
if (direction = 90)
{
sprite_index = spr_bull_right
speed = 2;
}
if (direction = 180)
{
sprite_index = spr_bull_right
speed = 2;
}
if (direction = 270)
{
sprite_index = spr_bull_right
speed = 2;
}
and this never works so please help me thanks
if this is in the step then it should work. Do you have other code in the step or keypresses that would be overriding this behavior?
no, I have nothing in the object bull except for the code in this video, so what can I do?
I've made my first game ever ^^
Congrats! I wish you luck upon your future projects😄
wow this was so easy it makes me feel dumb
That is easy ngl
HOW DO YOU MAKE IT BOUNCE BACK AND NOT GO THROUGH A WALL
Make wall solid. Then in the collision event with wall use move_bounce_all(true)
@@gamemakergameprogrammingco4786 where do I write that ""move_bounce_all(true)"" ??
Whatever moving object, say oBall, in its collision with wall event
You deserve a kiss in your mouth!