Path: blob/master/Sonic 1/Scripts/LZ/VerticalWrap.txt
1483 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: Vertical Wrap Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.yvel : player.yvel12private alias object.ypos : player.ypos131415// ========================16// Events17// ========================1819event ObjectUpdate20// First, check for bottom->top wrap21if player[0].yvel >= 022if camera[0].ypos >= 216823temp1 = player[0].ypos24foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)25temp0 = player[currentPlayer].ypos26temp0 -= temp127Abs(temp0)28if temp0 < 0x8C000029player[currentPlayer].ypos -= 0x800000030end if31next32camera[0].ypos -= 0x80033screen.yoffset -= 0x80034end if35end if3637// Then, check for top->bottom wrap38if player[0].yvel <= 039if camera[0].ypos <= 12040temp1 = player[0].ypos41foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)42temp0 = player[currentPlayer].ypos43temp0 -= temp144Abs(temp0)45if temp0 < 0x8C000046player[currentPlayer].ypos += 0x800000047end if48next49camera[0].ypos += 0x80050screen.yoffset += 0x80051end if52end if53end event545556// ========================57// Editor Events58// ========================5960event RSDKDraw61DrawSprite(0)62end event636465event RSDKLoad66LoadSpriteSheet("Global/Display.gif")67SpriteFrame(-8, -8, 16, 16, 239, 239) // "Trigger" - #06869SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")70end event717273