Path: blob/main/Scripts/Global/Invincibility.txt
1319 views
//----------------Sonic CD Invincibility Script---------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//34// Aliases5#alias Object.Value0 : Object.Timer67// States8#alias 0 : INVINCIBILITY_STATE9#alias 1 : INVINCIBILITY_AFTERIMAGE1011// Ink12#alias 2 : INK_ALPHA131415sub ObjectDraw16switch Object.State17case INVINCIBILITY_STATE18Object.Timer++19if Object.Timer > 320Object.Timer = 02122CreateTempObject(TypeName[Invincibility], 0, Player.XPos, Player.YPos)23Object[TempObjectPos].State = INVINCIBILITY_AFTERIMAGE24Object[TempObjectPos].InkEffect = INK_ALPHA25Object[TempObjectPos].Alpha = 25626Object[TempObjectPos].DrawOrder = 42728Object.Frame = Ring.Frame29Object.Frame &= 33031if Warp.Timer == 032DrawSpriteXY(Object.Frame, Player.XPos, Player.YPos)33end if34end if35break3637case INVINCIBILITY_AFTERIMAGE38Object.Frame = Ring.Frame39Object.Frame &= 34041if Warp.Timer == 042DrawSpriteFX(Object.Frame, FX_INK, Object.XPos, Object.YPos)43end if4445Object.Alpha -= 846if Object.Alpha == 12847Object.Type = TypeName[Blank Object]48end if49break5051end switch52end sub535455sub ObjectStartup56LoadSpriteSheet("Global/Items3.gif")5758SpriteFrame(-24, -24, 48, 48, 1, 1) // #0 - Invincibility Frame 059SpriteFrame(-24, -24, 48, 48, 1, 50) // #1 - Invincibility Frame 160SpriteFrame(-24, -24, 48, 48, 1, 99) // #2 - Invincibility Frame 261SpriteFrame(-24, -24, 48, 48, 1, 148) // #3 - Invincibility Frame 362end sub636465// ========================66// Editor Subs67// ========================6869sub RSDKDraw70DrawSprite(0)71end sub727374sub RSDKLoad75LoadSpriteSheet("Global/Items3.gif")76SpriteFrame(-24, -24, 48, 48, 1, 1) // #0 - Invincibility Frame 07778SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")79end sub808182