This is what i use to start off my AI as it is simple and you just slowly expand on it.
Lots of AI for game maker use the distance_to_object as it is very useful with it.
Heres a example of code i have done.
You can use it if you give credit.
if distance_to_object(object0)<300 then if instance_number(bullet)=0 {
instance_create(x,y,bullet)
}
First it checks the distance then checks then checks if theres no bullets exist then if thats all fine it creates a object which i have made go in the direction the ai was pointing.
Hope fully this helps some people with some AI programing.
Ill post more in normal category.
.
Users logged in:
Comments
Loading comments...