Path: blob/master/Sonic 1/Scripts/LZ/SBZ3Fall.txt
1483 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: SBZ3 Fall Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.value0 : object.playerID1213private alias 0 : SBZ3FALL_SETUP14private alias 1 : SBZ3FALL_HANDLEFALL1516// Player Aliases17private alias object.state : player.state18private alias object.direction : player.direction19private alias object.animation : player.animation20private alias object.gravity : player.gravity21private alias object.value26 : player.flightVelocity222324// ========================25// Events26// ========================2728event ObjectUpdate29if object.state == SBZ3FALL_SETUP30if recAnimation != 031temp0 = recAnimation32else33temp0 = ANI_HURT34temp0 <<= 1635temp0 |= ANI_HURT36temp0 <<= 837end if3839// Create an SBZ3 Fall object for every player40currentPlayer = 041while currentPlayer < playerCount42CreateTempObject(TypeName[SBZ3 Fall], 0, object.xpos, object.ypos)43object[tempObjectPos].state = SBZ3FALL_HANDLEFALL44object[tempObjectPos].playerID = currentPlayer45object[tempObjectPos].direction = temp046object[tempObjectPos].direction &= 0xFF47temp0 >>= 848object[tempObjectPos].animation = temp049object[tempObjectPos].animation &= 0xFF50temp0 >>= 85152currentPlayer++53loop5455object.type = TypeName[Blank Object]56else57currentPlayer = object.playerID5859if player[currentPlayer].gravity == GRAVITY_GROUND60object.type = TypeName[Blank Object]61else62player[currentPlayer].direction = object.direction63player[currentPlayer].animation = object.animation6465if player[currentPlayer].animation == ANI_JUMPING66#platform: USE_STANDALONE67player[currentPlayer].state = Player_State_Air68#endplatform69#platform: USE_ORIGINS70player[currentPlayer].state = Player_State_Air_NoDropDash71#endplatform72object.type = TypeName[Blank Object]73end if7475if player[currentPlayer].animation == ANI_FLYING76player[currentPlayer].state = Player_State_Fly77player[currentPlayer].flightVelocity = 0x80078object.type = TypeName[Blank Object]79end if8081if player[currentPlayer].animation == ANI_GLIDING82if player[currentPlayer].direction == 183player[currentPlayer].state = Player_State_GlideLeft84else85player[currentPlayer].state = Player_State_GlideRight86end if8788object.type = TypeName[Blank Object]89end if9091if player[currentPlayer].animation == ANI_GLIDING_DROP92player[currentPlayer].state = Player_State_GlideDrop93object.type = TypeName[Blank Object]94end if95end if96end if97end event9899100// ========================101// Editor Events102// ========================103104event RSDKDraw105DrawSprite(0)106end event107108109event RSDKLoad110LoadSpriteSheet("Global/Display.gif")111SpriteFrame(-8, -8, 16, 16, 239, 239) // "Trigger" - #0112113SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")114end event115116117