_cldcookie


Value Type

boolean

Description

Set to true when a robot collides with a bonus cookie. This variable triggers the section registered by the regcldcookie command to handle cookie collision events. Collision indicators are mutually exclusive. When _cldcookie is true all other collision variables will be false.

This variable is reset to false automatically when the cookie collision event handler completes. The _cldcookie variable can also be manually reset with the clear command. If no section has been registered to handle cookie collision events and the clear command is not used, _cldcookie will remain true until a collision with a different obstacle type occurs.

When a robot collides with a cookie the collision variables _cldbearing, _cldenergy, _cldheading, _cldid, and _cldteamid contain additional information.

See Also

regcldcookie, clear, _cldbearing, _cldenergy, _cldheading, _cldid, _cldteamid