home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
1,000 Games
/
1000GAME.iso
/
games
/
winrob12
/
target.prg
< prev
next >
Wrap
Text File
|
1995-03-16
|
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
}