Path: blob/main/Scripts/Animals/BlueBird.txt
1319 views
//------------------Sonic CD Blue Bird Script-----------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//34// Aliases5#alias Object.Value0 : Object.Timer6#alias Object.Value1 : Object.Angle78// HUD alias9#alias Object[24].PropertyValue : HUD.CurrentTimePeriod1011// States12#alias 0 : BLUEBIRD_FLYRIGHT13#alias 1 : BLUEBIRD_FLYLEFT1415// Time Period Aliases16#alias 2 : TIME_GOOD_FUTURE171819sub ObjectMain20// This Object is always running & updating, regardless of the Stage's current state21// However, it will only draw itself under the specific conditions, though it is being22// updated all the same2324switch Object.State25case BLUEBIRD_FLYRIGHT26if Object.Angle > 027Object.Angle -= 228else29// Apex hit, turn around3031Object.State = BLUEBIRD_FLYLEFT32Object.Direction = FACING_LEFT33end if34break3536case BLUEBIRD_FLYLEFT37if Object.Angle < 25638Object.Angle += 239else40// Other apex hit now, return to the other direction4142Object.State = BLUEBIRD_FLYRIGHT43Object.Direction = FACING_RIGHT44end if45break4647end switch4849// Animate the Blue Bird50Object.Timer++51if Object.Timer > 1952Object.Timer = 05354Object.Frame++5556// The Bird bounces between 2 frames total57Object.Frame &= 158end if5960end sub616263sub ObjectDraw64if MetalSonic_Destroyed == true65Cos(TempValue0, Object.Angle)66TempValue0 <<= 1467TempValue0 += Object.XPos6869Sin(TempValue1, Object.Angle)70TempValue1 <<= 1471TempValue1 += Object.YPos7273DrawSpriteFX(Object.Frame, FX_FLIP, TempValue0, TempValue1)74end if7576if HUD.CurrentTimePeriod == TIME_GOOD_FUTURE77Cos(TempValue0, Object.Angle)78TempValue0 <<= 1479TempValue0 += Object.XPos8081Sin(TempValue1, Object.Angle)82TempValue1 <<= 1483TempValue1 += Object.YPos8485DrawSpriteFX(Object.Frame, FX_FLIP, TempValue0, TempValue1)86end if87end sub888990sub ObjectStartup91LoadSpriteSheet("Global/Items3.gif")9293SpriteFrame(-8, -8, 16, 16, 240, 199)94SpriteFrame(-8, -8, 16, 16, 240, 216)95end sub969798// ========================99// Editor Subs100// ========================101102sub RSDKDraw103DrawSprite(0)104end sub105106107sub RSDKLoad108LoadSpriteSheet("Global/Items3.gif")109SpriteFrame(-8, -8, 16, 16, 240, 199)110111SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")112end sub113114115