Path: blob/main/Scripts/Mission/MissionAreaBL.txt
1319 views
//----------Sonic CD Mission Area Bottom Left Script----------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//34// Aliases5#alias Object.State : Object.SetBounds67// Priority8#alias 1 : PRIORITY_ACTIVE9#alias 5 : PRIORITY_INACTIVE101112sub ObjectMain1314// If it hasn't been done already, set the Stage's Bottom Left boundaries15if Object.SetBounds == false1617// Move the X Bounds to 16 pixels to the left of this Object18Stage.NewXBoundary1 = Object.XPos19Stage.NewXBoundary1 >>= 1620Stage.NewXBoundary1 -= 162122// And then move the Y Bounds to be right at this Object's position23Stage.NewYBoundary2 = Object.YPos24Stage.NewYBoundary2 >>= 162526// Set the flag, as the bounds have been set now27Object.SetBounds = true28end if2930if Stage.State == STAGE_RUNNING31if Player.YPos > Object.YPos32CheckEqual(Player.State, Player_State_Death)33TempValue0 = CheckResult34CheckEqual(Player.State, Player_State_Drown)35CheckResult |= TempValue036if CheckResult == false37Player.YVelocity = 038Player.Speed = 039Player.YPos = Object.YPos40game.forceKillPlayer = true41end if4243// Stop the object from running any further44Object.Priority = PRIORITY_INACTIVE45end if4647if Player.XPos < Object.XPos48Player.XVelocity = 049Player.Speed = 050Player.XPos = Object.XPos51end if52end if5354end sub555657sub ObjectStartup5859// Cycle through all objects in the scene, and make all Mission Area markers active60ArrayPos0 = 3261while ArrayPos0 < 105662if Object[ArrayPos0].Type == TypeName[MissionAreaBL]63Object[ArrayPos0].Priority = PRIORITY_ACTIVE64end if6566ArrayPos0++67loop6869end sub707172// ========================73// Editor Subs74// ========================7576sub RSDKDraw77DrawSprite(0)78end sub798081sub RSDKLoad82LoadSpriteSheet("Mission/Objects.gif")83SpriteFrame(-16, -16, 32, 32, 1, 34) // #0 - "Bottom Left" Editor Icon8485SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")86end sub878889