Path: blob/main/Scripts/Mission/MissionAreaTR.txt
1319 views
//-----------Sonic CD Mission Area Top Right 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_ACTIVE91011sub ObjectMain1213// If it hasn't been done already, set the Stage's Top Right boundaries14if Object.SetBounds == false1516// Move the X Bounds to 16 pixels to the right of this Object17Stage.NewXBoundary2 = Object.XPos18Stage.NewXBoundary2 >>= 1619Stage.NewXBoundary2 += 162021// And then move the Y Bounds to be right at this Object's position22Stage.NewYBoundary1 = Object.YPos23Stage.NewYBoundary1 >>= 162425// Set the flag, as the bounds have been set now26Object.SetBounds = true27end if2829if Stage.State == STAGE_RUNNING30if Player.YPos < Object.YPos31Player.YVelocity = 032Player.Speed = 033Player.YPos = Object.YPos34end if3536if Player.XPos > Object.XPos37Player.XVelocity = 038Player.Speed = 039Player.XPos = Object.XPos40end if41end if4243end sub444546sub ObjectStartup47ArrayPos0 = 3248while ArrayPos0 < 105649if Object[ArrayPos0].Type == TypeName[MissionAreaTR]50Object[ArrayPos0].Priority = PRIORITY_ACTIVE51end if5253ArrayPos0++54loop5556end sub575859// ========================60// Editor Subs61// ========================6263sub RSDKDraw64DrawSprite(0)65end sub666768sub RSDKLoad69LoadSpriteSheet("Mission/Objects.gif")70SpriteFrame(-16, -16, 32, 32, 1, 34) // #0 - "Top Right" Editor Icon7172SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")73end sub747576