How to make a monster follow pean trail
#1
Posted 10 April 2012 - 07:22 PM
#2
Posted 10 April 2012 - 07:34 PM
In my game the character will be dropping beans and the monster who is exploring the level randomly when they are close to the peans I want them to follow the trail of the peans. How do I do that in game maker? The intention is that they stop their current AI where they explore the level randomly and simply follow the trail of the beans on the ground and when they follow the trail, they consume the beans ones the beans are consume they return back to their original AI. I do not know where to begin on this, any help would be SWEETLY appreciate it! Thanks in advance.
Easy - for AI
if distance_to_object(bean) < 100 {move_towards_point(x,y,bean.x,bean.y,2)]May not be working since i hadnt use this in a while
distance_to_point maybe ? not sure
Edited by XTIDIA Games, 10 April 2012 - 07:35 PM.
#3
Posted 10 April 2012 - 07:40 PM
take out the move_towards event and put in a function (no idea what this is sorryEasy - for AI
if distance_to_object(bean) < 100 {move_towards_point(x,y,bean.x,bean.y,2)
May not be working since i hadnt use this in a while
#4
Posted 11 April 2012 - 12:00 AM
What your gonna want to do is make a path activate when your close to the beans with the functionthe other guy was saying about:
take out the move_towards event and put in a function (no idea what this is sorryEasy - for AI
if distance_to_object(bean) < 100 {move_towards_point(x,y,bean.x,bean.y,2)
May not be working since i hadnt use this in a while) but once you find the function it should work fine.
I wanted to thank you ALL for all your helps fast reply!
#5
Posted 15 April 2012 - 06:56 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











