Path: blob/main/Scripts/R4/FaceProjectile.txt
1319 views
//---------------Sonic CD Face Projectile Script--------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//34// Aliases5#alias Object.Value1 : Object.XVelocity678sub ObjectMain9Object.XPos += Object.XVelocity10if Object.OutOfBounds == true11Object.Type = TypeName[Blank Object]12end if13end sub141516sub ObjectPlayerInteraction17if Player.YVelocity > -0xE000018PlayerObjectCollision(C_TOUCH, -13, -8, 13, 8)19if CheckResult == true20if Object.Direction == FACING_RIGHT21if Player.Left == true22if Player.Speed > -0x3000023Player.Speed = -0x3000024end if25#platform: Use_Origins26if Player.Direction == FACING_LEFT27if Player.Animation == ANI_GLIDING28Player.Speed *= -129end if30end if31#endplatform32else33if Player.Right == true34Player.Speed = -0x2000035else36Player.Speed = -0x3000037end if38#platform: Use_Origins39if Player.Direction == FACING_LEFT40if Player.Animation == ANI_GLIDING41Player.Speed *= -142end if43end if44#endplatform45end if46else47if Player.Right == true48if Player.Speed < 0x3000049Player.Speed = 0x3000050end if51else52if Player.Left == true53Player.Speed = 0x2000054else55Player.Speed = 0x3000056end if57#platform: Use_Origins58if Player.Direction == FACING_LEFT59if Player.Animation == ANI_GLIDING60Player.Speed *= -161end if62end if63#endplatform64end if65end if66#platform: Use_Origins67if Player.Animation == ANI_GLIDING_DROP68Player.Speed = 069end if70#endplatform71end if72end if73end sub747576sub ObjectDraw77if Object.AnimationTimer > 978Object.Direction += 279DrawSpriteFX(0, FX_FLIP, Object.XPos, Object.YPos)80Object.Direction -= 281else82DrawSpriteFX(0, FX_FLIP, Object.XPos, Object.YPos)83end if8485Object.AnimationTimer++86Object.AnimationTimer %= 2087end sub888990sub ObjectStartup91LoadSpriteSheet("R4/Objects2.gif")9293SpriteFrame(-16, -8, 32, 16, 152, 159) // #0 - Face Projectile94end sub959697// ========================98// Editor Subs99// ========================100101sub RSDKDraw102DrawSprite(0)103end sub104105106sub RSDKLoad107LoadSpriteSheet("R4/Objects2.gif")108109SpriteFrame(-16, -8, 32, 16, 152, 159) // #0 - Face Projectile110111SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")112end sub113114115