Causes a sprite to "pulse" in and out in opacity by settable degrees at selectable rates.
-- By Warren "The Howdy Man" Ockrassa, warren@nightwares.com
-- This causes any given sprite onscreen to "pulsate" in opacity
-- Drag and drop to invoke the GPDL, then set the max and min opacity values (in percent) as well as the step value
on GetBehaviorDescription
set sContent = "This allows any sprite to pulsate in and out in opacity." & RETURN & RETURN & "Parameters include maximum opacity, minimum opacity, and step value."
return sContent
END GetBehaviorDescription
on GetBehaviorTooltip
set sContent = "This allows any sprite to pulsate in and out in opacity." & RETURN & RETURN & "Parameters include maximum opacity, minimum opacity, and step value."
return sContent
END GetBehaviorTooltip
on BeginSprite me
set pnMySprite = the currentSpriteNum
set the ink of sprite pnMySprite = 32 -- blend
END BeginSprite
on PrepareFrame me
if the blend of sprite pnMySprite >= pnMaximumOpacity then
set pbFading = TRUE
else if the blend of sprite pnMySprite <= pnMinimumOpacity then
set pbFading = FALSE
end if
if pbFading then
set the blend of sprite pnMySprite = the blend of sprite pnMySprite - pnFadeStep
else
set the blend of sprite pnMySprite = the blend of sprite pnMySprite + pnFadeStep
end if
end PrepareFrame
on GetPropertyDescriptionList me
if not ( the currentSpriteNum ) then
-- behavior has been dropped on the script channel; kickout
exit
end if
return [ #pnMaximumOpacity: [ #comment: "What is the MAXIMUM opacity you want in percent?", #format: #integer, #default: 100, #range: [#min: 1, #max: 100] ], #pnMinimumOpacity: [ #comment: "What is the MINIMUM opacity you want in percent?", #format: #integer, #default: 50, #range: [#min: 0, #max: 100] ], #pnFadeStep: [ #comment: "By what amount do you want the opacity to be stepped each time?", #format: #integer, #default: 1, #range: [#min: 1, #max: 100] ] ]
end GetPropertyDescriptionList
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA