0% found this document useful (0 votes)
20 views2 pages

SBZ3 Fall

The document describes a script for the SBZ3 Fall Object in the RSDK Project for Sonic 1/Sonic 2, authored by Christian Whitehead and Simon Thomley. It outlines the behavior of the object based on player states and animations, including handling various player actions like jumping, flying, and gliding. Additionally, it includes events for drawing and loading sprites associated with the object.

Uploaded by

Jogatina animal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

SBZ3 Fall

The document describes a script for the SBZ3 Fall Object in the RSDK Project for Sonic 1/Sonic 2, authored by Christian Whitehead and Simon Thomley. It outlines the behavior of the object based on player states and animations, including handling various player actions like jumping, flying, and gliding. Additionally, it includes events for drawing and loading sprites associated with the object.

Uploaded by

Jogatina animal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

// ----------------------------------

// RSDK Project: Sonic 1/Sonic 2


// Script Description: SBZ3 Fall Object
// Script Author: Christian Whitehead/Simon Thomley
// Unpacked by Rubberduckycooly's script unpacker
// ----------------------------------

//-------Aliases-------//
private alias 72 : TYPE_SBZ3FALL

// Static Values

// Tables

event ObjectMain
if object.state == 0
if recAnimation != 0
temp0 = recAnimation
else
temp0 = ANI_HURT
temp0 <<= 16
temp0 |= ANI_HURT
temp0 <<= 8
end if
currentPlayer = 0
while currentPlayer < playerCount
CreateTempObject(TypeName[SBZ3 Fall], 0, object.xpos,
object.ypos)
object[tempObjectPos].state = 1
object[tempObjectPos].value0 = currentPlayer
object[tempObjectPos].direction = temp0
object[tempObjectPos].direction &= 255
temp0 >>= 8
object[tempObjectPos].animation = temp0
object[tempObjectPos].animation &= 255
temp0 >>= 8
currentPlayer++
loop
object.type = TypeName[Blank Object]
else
currentPlayer = object.value0
if object[currentPlayer].gravity == GRAVITY_GROUND
object.type = TypeName[Blank Object]
else
object[currentPlayer].direction = object.direction
object[currentPlayer].animation = object.animation
if object[currentPlayer].animation == ANI_JUMPING
object[currentPlayer].state = PlayerObject_HandleAir
object.type = TypeName[Blank Object]
end if
if object[currentPlayer].animation == ANI_FLYING
object[currentPlayer].state =
PlayerObject_HandleTailsFlight
object[currentPlayer].value26 = 0x800
object.type = TypeName[Blank Object]
end if
if object[currentPlayer].animation == ANI_GLIDING
if object[currentPlayer].direction == FLIP_X
object[currentPlayer].state =
PlayerObject_KnuxGlideLeft
else
object[currentPlayer].state =
PlayerObject_KnuxGlideRight
end if
object.type = TypeName[Blank Object]
end if
if object[currentPlayer].animation == ANI_GLIDING_DROP
object[currentPlayer].state = PlayerObject_KnuxGlideDrop
object.type = TypeName[Blank Object]
end if
end if
end if
end event

event RSDKDraw
DrawSprite(0)
end event

event RSDKLoad
LoadSpriteSheet("Global/Display.gif")
SpriteFrame(-16, -16, 32, 32, 1, 143)
end event

You might also like