How do you end the tick with extends Robot? --Starrynte lol. Have you ever written an ExtendsRobot? The basic idea with a Robot is that you don't have "setXXX" calls, so every movement call is blocking. Calling "ahead(x);" is the same as calling "setAhead(x);while (getDistanceRemaining?() != 0)execute();" and calling "fire(x);" is the same as calling "setFire(x);execute();". That makes it so that you can move at the same time as you turn, or turn your radar at the same time as you move, or even fire at the same time as you do anything else, with the exception that you can do things concurrently if you do some of them in an event handler (for instance, if you get a scan while you're moving, you could turn your gun and shoot in onScannedRobt?, but you'd still be moving, presumably from your run method). -- Kawigi
|