• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

AI Help [SOLVED]

N

NFTGaming

Guest
Hi,
I'm fairly new to GameMaker and am working on a survival game which includes AI. I'm making chickens and they walk around using :
motion_set(choose(0,45,90,135,180,225,270,315,), chicken_spd/2);
and:
if alarm[0] = -1
alarm[0] = choose(0,0,0,0,0,0,0,0,0,1,2,3,4,5)*room_speed
This is good and it works but in survival games, chickens walk around but then stop for a while and sit there. That's what I want them to do but do not know how.

Thanks ;D
 

Imperial

Member
Code:
//Create Event
direction = random(360);
speed = choose(0,4);
alarm[0] = room_speed * random_range(1,5);

//Alarm 0 Event
direction = random(360);
speed = choose(0,4);
alarm[0] = room_speed * random_range(1,5);
 
N

NFTGaming

Guest
Thanks everyone for the quick reply and help. It is working as I wanted =)
NFT
 
Top