Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Jannis Harder
RE: Can Someone Explain this Behaviour? [ reply ]  
2005-12-01 16:34
It stops only if it finds an enemy.. in the next frame the enemy moved and the events are empty again...

By: Simon Kröger
RE: Can Someone Explain this Behaviour? [ reply ]  
2005-12-01 16:33
If you don't move the radar you just scan in the exact direction the radar is pointing. It's very unlikely that there is a robot in exactly that direction so it starts scanning again.
(you can just scan the centerpoint of a robot)

By: Matthew Linnell
Can Someone Explain this Behaviour? [ reply ]  
2005-12-01 16:16
I would expect the following code to have the robot scan until it finds a target, at which point all scanning stops. However, the actual behaviour is that it continues scanning ... and I'm not sure I understand why. Can someone enlighten me?

require 'robot'

class Scanning
include Robot

def tick( events )
turn_gun( 1 ) if events['robot_scanned'].empty?
end
end