This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-09-26 20:09:10

chivas604
New Scratcher
Registered: 2011-09-01
Posts: 3

Tron Light Cycle Help

hello i am making a tron light cycle game. I am trying to get the enemy cycle to move in a random movement just like the real light cycle game, but i am having trouble to get the enemy to just stop going back on itself or keep hitting the wall!!!! Please help me by either responding or just showing me
Thank you
chivas604

Offline

 

#2 2011-09-27 13:14:35

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Tron Light Cycle Help

cool idea! You could save the random direction to a variable, but it would make sure tat the direction isn't the opposite of the last one, then point in direction (variable) For more advanced make sensors on the front left and right and make it so if the sensor to the left is touching the color of its line, it would turn right 90 degrees, on the right it would turn left 90 degrees and on the front it would pick a random 1 to 2 and if its one turn right 90 else turn left 90. Hope this helps.

~Pecola1


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

Board footer