Path: blob/master/Sonic 1/Scripts/Global/RingSparkle.txt
1482 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: Ring Sparkle Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.value0 : object.timer1213// Ring Reset (Mission Object) Aliases14private alias object.value0 : object.timeCheckpoint15private alias object.value2 : object.missionTypeEX1617private alias 10 : MISSIONNO_RINGCHALLENGE50181920// ========================21// Events22// ========================2324event ObjectUpdate25object.timer++26if object.timer == 627object.timer = 028object.frame++2930if object.frame == 431object.type = TypeName[Blank Object]32object.frame = 03334#platform: USE_ORIGINS35if game.playMode == BOOT_PLAYMODE_MISSION36if game.missionFunctionNo == MISSIONNO_RINGCHALLENGE5037// Turn the Object into a Ring Reset Object38// -> missionTypeEX is set by a foreach in Ring Reset's startup39object.type = object.missionTypeEX4041// Now, set the time the Object was collected + 20 seconds42object.timeCheckpoint = stage.minutes43object.timeCheckpoint *= 6044object.timeCheckpoint += stage.seconds45object.timeCheckpoint += 204647object.priority = PRIORITY_ACTIVE48end if49end if50#endplatform51end if52end if53end event545556event ObjectDraw57DrawSprite(object.frame)58end event596061event ObjectStartup62LoadSpriteSheet("Global/Items.gif")6364// Sparkle frames65SpriteFrame(-8, -8, 16, 16, 1, 202)66SpriteFrame(-8, -8, 16, 16, 18, 202)67SpriteFrame(-8, -8, 16, 16, 1, 219)68SpriteFrame(-8, -8, 16, 16, 18, 219)69end event707172// ========================73// Editor Events74// ========================7576event RSDKDraw77DrawSprite(0)78end event798081event RSDKLoad82LoadSpriteSheet("Global/Items.gif")83SpriteFrame(-8, -8, 16, 16, 1, 202) // * Sparkle *8485SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")86end event878889