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
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
Offline