View Single Post
Old 06-13-07, 12:05 PM   #90
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

Hey, how would I code it to randomize waypoint.speed, but only if the speed for the given waypoint is > some number (say 5)?

I tried:
Code:
from random import randint
i = group.waypoints.iterator ()
for waypoint in i:   
    if waypoint.speed > 5:
    waypoint.speed = randint(6,10)
but it doesn't work
tater is offline   Reply With Quote