Path: blob/main/Scripts/R7/BoundaryAdjust.txt
1319 views
//--------------Sonic CD Boundary Adjust Script---------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//34// Aliases5#alias 0 : BOUNDADJUST_TYPE_FROMRIGHT6#alias 1 : BOUNDADJUST_TYPE_FROMLEFT789sub ObjectMain10// hardcoded Y positions are used here :(1112if Object.PropertyValue == BOUNDADJUST_TYPE_FROMRIGHT13if Player.XPos > Object.XPos14Stage.NewYBoundary2 = 52015else16Stage.NewYBoundary2 = 76817end if18else19if Player.XPos < Object.XPos20Stage.NewYBoundary2 = 52021else22Stage.NewYBoundary2 = 76823end if24end if2526end sub272829// ========================30// Editor Subs31// ========================3233sub RSDKEdit34if Editor.ReturnVariable == true35switch Editor.VariableID36case EDIT_VAR_PROPVAL // Property Value37case 0 // Type38CheckResult = Object.PropertyValue39break40end switch41else42switch Editor.VariableID43case EDIT_VAR_PROPVAL // Property Value44case 0 // Type45Object.PropertyValue = Editor.VariableValue46break47end switch48end if49end sub505152sub RSDKDraw53DrawSprite(0)54end sub555657sub RSDKLoad58LoadSpriteSheet("Global/Display.gif")59SpriteFrame(-8, -8, 16, 16, 173, 67) // "T" (rigger) icon6061// Not the best names, but there's not really much else that can be said...62AddEditorVariable("type")63SetActiveVariable("type")64AddEnumVariable("Right", BOUNDADJUST_TYPE_FROMRIGHT)65AddEnumVariable("Left", BOUNDADJUST_TYPE_FROMLEFT)66end sub676869