ID:159550
 
I'm confused on how to make a monster AI system. I've been trying to make a monster move around randomly on their own and attack a player if they get within the monsters range. I've tried looking through the guide and I kind of got the monster to be able to move on its own but it doesn't quite work the way I want it to. Can someone give me a quick sample of code on how to make a monster move randomly and attack if a player gets within range?? Thanks
There are plenty of AI resources you can look up. Just search them.
Lummox Jr has covered a lot about AI in Dream Makers.
step_rand(src)

Will move something randomly
As for attacking that depends on the game.