Path: blob/master/Sonic 1/Scripts/GHZ/WaterfallSound.txt
1480 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: Waterfall Sound Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011// A pair of unused values, reset once then never seen again...12// -> Bit of a shot in the dark, but these may have been early versions of the13// GHZSetup static values before the waterfall sound system got reworked14// - This coincides with how the rest of GHZ is formatted like RSDKv3 scripts as well,15// given that static variables didn't exist back then16private alias object.value0 : object.unused117private alias object.value1 : object.unused21819// Player Aliases20private alias object.xpos : player.xpos212223// ========================24// Events25// ========================2627event ObjectUpdate28object.priority = PRIORITY_ACTIVE2930GHZSetup_playWaterfallSfx = true3132// Check if the object is out of bounds33temp0 = camera[0].xpos34temp0 -= object.ixpos35Abs(temp0)36temp0 -= 12837if temp0 > screen.xcenter38object.priority = PRIORITY_XBOUNDS39// these aren't used anywhere else...40object.unused1 = 041object.unused2 = 042end if4344// Make the SFX pan relative to player 1's position45GHZSetup_waterfallPan = object.xpos46GHZSetup_waterfallPan -= player[0].xpos47GHZSetup_waterfallPan >>= 1848end event495051event ObjectStartup52foreach (TypeName[Waterfall Sound], arrayPos0, ALL_ENTITIES)53object[arrayPos0].priority = PRIORITY_XBOUNDS54next55end event565758// ========================59// Editor Events60// ========================6162event RSDKDraw63DrawSprite(0)64end event656667event RSDKLoad68LoadSpriteSheet("Global/Display.gif")69SpriteFrame(-8, -8, 16, 16, 165, 141) // small "W"7071SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")72end event737475