Path: blob/main/Scripts/R3/FPlatform.txt
1319 views
//--------------Sonic CD Floating Platform Script-------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//34// Aliases5#alias Object.Value0 : Object.OnObject6#alias Object.Value1 : Object.Timer7#alias Object.Value2 : Object.YPlayerFloor8#alias Object.Value3 : Object.YOriginPos91011sub ObjectMain12if Object.OnObject == true13if Object.Timer < 1614Object.Timer++1516TempValue0 = Object.Timer17TempValue0 &= 31819if TempValue0 == 320Object.YPlayerFloor = 0x1000021else22Object.YPlayerFloor = 023end if24else25Object.YPlayerFloor = 026end if27else28if Object.Timer > 029Object.Timer--3031TempValue0 = Object.Timer32TempValue0 &= 33334if TempValue0 == 335Object.YPlayerFloor = -0x1000036else37Object.YPlayerFloor = 038end if39else40Object.YPlayerFloor = 041Object.YPos = Object.YOriginPos42end if43end if4445Object.OnObject = false46end sub474849sub ObjectPlayerInteraction50PlayerObjectCollision(C_PLATFORM, -32, -17, 32, 12)51if CheckResult == true52Object.OnObject = true53Player.YPos += Object.YPlayerFloor54Player.YPos += 0x1000055end if56end sub575859sub ObjectDraw60Object.YPos += Object.YPlayerFloor61DrawSprite(0)62end sub636465sub ObjectStartup66LoadSpriteSheet("R3/Objects.gif")6768SpriteFrame(-32, -16, 64, 32, 100, 1) // #0 - Floating Platform6970ArrayPos0 = 3271while ArrayPos0 < 105672if Object[ArrayPos0].Type == TypeName[F Platform]73Object[ArrayPos0].YOriginPos = Object[ArrayPos0].YPos74end if75ArrayPos0++76loop77end sub787980// ========================81// Editor Subs82// ========================838485sub RSDKDraw86DrawSprite(0)87end sub888990sub RSDKLoad91LoadSpriteSheet("R3/Objects.gif")9293SpriteFrame(-32, -16, 64, 32, 100, 1) // #0 - Floating Platform9495SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")96end sub979899