home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Review 28
/
Creative-Review-CD-ROM-28.iso
/
pc
/
kungfu
/
assets
/
game.dir
/
00075_Script_handlers
< prev
next >
Wrap
Text File
|
1997-08-08
|
1KB
|
88 lines
-- handlers
--------------------------------
on checkaprop thelist, theprop, thedefault
set thevalue = getaprop(thelist, theprop)
if voidp(thevalue) then return thedefault
else return thevalue
end checkaprop
--------------------------------
on mouse
return point (the mouseh, the mousev)
end mouse
--------------------------------
on kill obj
repeat with index = 1 to count (obj)
set prop = getpropat (obj, index)
set value = getaprop (obj, prop)
setprop obj, prop, #dead
end repeat
end obj
--------------------------------
on data2list thefield
set list = value ( field thefield )
unloadmember thefield
return list
end data2list
--------------------------------
on list2object thelist, obj
repeat with index = 1 to count (thelist)
set prop = getpropat (thelist, index)
set value = getaprop (thelist, prop)
setaprop obj, prop, value
end repeat
end list2object
on sense thenum
if thenum > 1 then return 1
else if thenum < 0 then return -1
else return 0
end sense
on prob percent
if random (100) <= percent then return true
else return false
end prob
on turnpuppets back, front, state
repeat with channel = back to front
puppetsprite channel, state
end repeat
end turnpuppets
on win
hendgame
go frame "win"
end win