Path: blob/master/Sonic 1/Scripts/SBZ/TransSprite.txt
1483 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: Trans Sprite Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Events9// ========================1011event ObjectDraw12// Simply draw the current frame, no animation or anything needed13DrawSprite(object.propertyValue)14end event151617event ObjectStartup18LoadSpriteSheet("SBZ/Objects.gif")1920// Sprite frames21SpriteFrame(-28, -32, 56, 64, 268, 274)22SpriteFrame(-28, -32, 56, 64, 325, 274)2324// Setup for every object in the stage25foreach (TypeName[Trans Sprite], arrayPos0, ALL_ENTITIES)26// Limit the property value to 1 max27object[arrayPos0].propertyValue &= 12829// Set the draworder to 5 (FG)30object[arrayPos0].drawOrder = 531next32end event333435// ========================36// Editor Events37// ========================3839event RSDKEdit40if editor.returnVariable == true41switch editor.variableID42case EDIT_VAR_PROPVAL // property value43checkResult = object.propertyValue44checkResult &= 145break4647case 0 // type48checkResult = object.propertyValue49checkResult &= 150break5152end switch53else54switch editor.variableID55case EDIT_VAR_PROPVAL // property value56object.propertyValue = editor.variableValue57object.propertyValue &= 158break5960case 0 // type61object.propertyValue = editor.variableValue62object.propertyValue &= 163break6465end switch66end if67end event686970event RSDKDraw71DrawSprite(object.propertyValue)72end event737475event RSDKLoad76LoadSpriteSheet("SBZ/Objects.gif")77SpriteFrame(-28, -32, 56, 64, 268, 274)78SpriteFrame(-28, -32, 56, 64, 325, 274)7980AddEditorVariable("frameID")81SetActiveVariable("frameID")82AddEnumVariable("Left", 0)83AddEnumVariable("Right", 1)84end event858687