home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
300 Favorite Games
/
300GAMES.iso
/
204
/
target.prg
< prev
next >
Wrap
Text File
|
1995-08-14
|
980b
|
30 lines
#############################################################################
# TARGET #
# #
# This robot demonstrates the potential of custom events. This robot sets #
# up a custom event that acts as a trigger. Although this robot only moves #
# when its trigger goes off, a better robot might change its entire #
# behavior. Simply by re-registering some choice sections, such as core, #
# one robot can act like many robots wrapped up in one! #
# #
#############################################################################
Init
{
Name( "Target" )
LockAll( TRUE )
trigger = 80
RegCustom( Move, 1, energy <= trigger )
}
Move
{
BodyLeft( 65 )
Ahead( 100 )
trigger = trigger - 20
}