Game Maker Studio: How to Create Monsters, to Move Randomly Toward Player.
Channel:
Subscribers:
271
Published on ● Video Link: https://www.youtube.com/watch?v=p3M_oZVDf6c
Visit my MC Anime site: https://mcanime1.wixsite.com/mcanime
GMX File: https://bit.ly/30u9vvN
obj_monster, be sure its set to Solid, so monsters do not go through themselves.
Events:
Create
Actions:
alarm[0]=30
Events:
Alarm 0
Actions:
///For monsters to move randomly
direction=irandom_range(0,359)around
speed=6
alarm[0]=30
//For monsters to move toward the player
newdir=point_direction(x,y,obj_player.x,obj_player.y) + irandom_range(-20,20)
speed=6
direction=newdir
alarm[0]=30
Other Videos By MC Designs
Tags:
pc
windows
android
device
move
toward
monsters
irandom
random
range
direction
newdir
player
alarm
speed
follow
learn
teach
how
show
randomly
game
maker
studio
point
around
solid
wall
next
room