S
sharpman5k
Guest
Hello, I'm fairly new to this whole game development thing, have mainly done pixel art in the past but no programming. So even the simplest things are difficult to comprehend for me, though I am more than willing to learn.
What I'm wanting to do is make an enemy move in a random direction, for a random amount of time until it changes to another random direction. An example would be the Stalfos or Darknut enemies from the first Zelda. A quick google search did not really help me, although I did find this under motion_set in the Help System.
if irandom(9) = 1 motion_set(random(360), 1 + random(3));
I first attempted to change (360) into (0, 90, 180, 270) thinking it would chose between those directions, but it instead caused a crash.
I'm not even sure if I'm on the right track.
What I'm wanting to do is make an enemy move in a random direction, for a random amount of time until it changes to another random direction. An example would be the Stalfos or Darknut enemies from the first Zelda. A quick google search did not really help me, although I did find this under motion_set in the Help System.
if irandom(9) = 1 motion_set(random(360), 1 + random(3));
I first attempted to change (360) into (0, 90, 180, 270) thinking it would chose between those directions, but it instead caused a crash.
I'm not even sure if I'm on the right track.