Path: blob/main/Scripts/Global/RingSparkle.txt
1319 views
//----------------Sonic CD Ring Sparkle Script----------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//34// Aliases5#alias Object.Value0 : Object.Timer6// Value1 is skipped over7#alias Object.Value2 : Object.MissionTypeEX89// Ring Reset Aliases10#alias Object.Value0 : Object.TimeCheckpoint1112// Priority Aliases13#alias 1 : PRIORITY_ACTIVE1415// Priority Aliases16#alias 10 : RULE_RESPAWN_RINGS171819sub ObjectMain2021Object.Timer++22if Object.Timer == 62324Object.Timer = 025Object.Frame++2627// There are only 4 Ring Sparkle frames, unload once attempting to progress from the final one28if Object.Frame == 429Object.Type = TypeName[Blank Object]30Object.Frame = 03132#platform: Use_Origins33if game.playMode == BOOT_PLAYMODE_MISSION34// Set during "M079 - Ring Challenge 100"35if game.missionFunctionNo == RULE_RESPAWN_RINGS3637// Turn into the Ring Reset object38// -> MissionTypeEX is set in the Ring Reset script39Object.Type = Object.MissionTypeEX4041// Take the current time + 20 and set it to this object's Time Checkpoint42Object.TimeCheckpoint = Stage.Minutes43Object.TimeCheckpoint *= 6044Object.TimeCheckpoint += Stage.Seconds45Object.TimeCheckpoint += 204647// While as a Ring Reset object, this object should always be updating before turning back into a Ring object48Object.Priority = PRIORITY_ACTIVE4950end if51end if52#endplatform53end if54end if5556end sub575859sub ObjectDraw60DrawSprite(Object.Frame)61end sub626364sub ObjectStartup6566LoadSpriteSheet("Global/Items.gif")6768// 0-3 - Ring Sparkle Frames69SpriteFrame(-8, -8, 16, 16, 1, 202)70SpriteFrame(-8, -8, 16, 16, 18, 202)71SpriteFrame(-8, -8, 16, 16, 1, 219)72SpriteFrame(-8, -8, 16, 16, 18, 219)7374end sub757677// ========================78// Editor Subs79// ========================8081sub RSDKDraw82DrawSprite(0)83end sub848586sub RSDKLoad87LoadSpriteSheet("Global/Items.gif")88SpriteFrame(-8, -8, 16, 16, 1, 202)8990SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")91end sub929394