Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Ravenplucker

Pages: [1]
1
Newbie / Hello! (I also need help with some code)
« on: May 16, 2012, 05:30:44 AM »
Hey guys. I've just started messing around with Darwinbots, and am trying to add some random behaviour.  I can't figure out why this code doesn't work. I want it to randomly spin to the left and right. Anyone willing to lend a hand?

' Behaviour determination
cond
 1 1 =            ' always true (easier way to do it...?)
start
 50 rnd 150 store       ' Generates number between 0-50 every cycle and stores it in *150
stop

cond
 *150 10 =         ' if *150 = 10
start
 *151 10 store        ' then *151 = 10
stop


cond
 *150 11  =         ' if *150 = 11
start
 *151 11 store        ' then *151 = 11
stop



'Gene 2
'Spinning

cond
 *151 10 =         ' if *151 = 10
start
 300 .aimdx store       ' rotate 300-somethings to the right
stop


cond
 *151 11 =         ' if *151 = 11
start
 300 .aimsx store       ' rotate 300 somethings to the left
stop

end

I don't think this subforum has been posted in for awhile, but hopefully there's someone who can help me out.

Pages: [1]