Path: blob/master/Sonic 2/Scripts/EHZ/BurningLog.txt
1483 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: Burning Log Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.value0 : object.timer1213// States14private alias 0 : BURNINGLOG_BURN15private alias 1 : BURNINGLOG_FALL1617// Player Aliases18private alias object.value40 : player.hitboxLeft19private alias object.value38 : player.hitboxTop20private alias object.value41 : player.hitboxRight21private alias object.value39 : player.hitboxBottom222324// ========================25// Events26// ========================2728event ObjectUpdate29switch object.state30case BURNINGLOG_BURN31object.timer--32if object.timer <= 033object.state = BURNINGLOG_FALL34end if35break3637case BURNINGLOG_FALL38object.ypos += object.yvel39object.yvel += 0x38004041if object.outOfBounds == true42object.type = TypeName[Blank Object]43end if44break4546end switch4748foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)49// i can see why they did it, but it's kinda weird to use the hitbox values for platform collision..50BoxCollisionTest(C_PLATFORM, object.entityPos, -8, -8, 8, 8, currentPlayer, player[currentPlayer].hitboxLeft, player[currentPlayer].hitboxTop, player[currentPlayer].hitboxRight, player[currentPlayer].hitboxBottom)51if object.timer <= 1552BoxCollisionTest(C_TOUCH, object.entityPos, -8, -16, 8, 8, currentPlayer, player[currentPlayer].hitboxLeft, player[currentPlayer].hitboxTop, player[currentPlayer].hitboxRight, player[currentPlayer].hitboxBottom)53if checkResult == true54CallFunction(Player_FireHit)55end if56end if57next5859object.frame = object.animationTimer60object.frame /= 361object.frame += 362object.animationTimer++63if object.animationTimer >= 664object.animationTimer = 065end if66end event676869event ObjectDraw70DrawSprite(0)7172if object.timer <= 1573GetBit(object.direction, oscillation, 2)74DrawSpriteFX(1, FX_FLIP, object.xpos, object.ypos)75end if76end event777879event ObjectStartup80CheckCurrentStageFolder("Zone01")81if checkResult == true82LoadSpriteSheet("EHZ/Objects.gif")83SpriteFrame(-8, -8, 16, 16, 82, 78)84SpriteFrame(-8, -16, 16, 24, 110, 19)85else86LoadSpriteSheet("MBZ/Objects.gif")87SpriteFrame(-8, -8, 16, 16, 137, 313)88SpriteFrame(-8, -16, 16, 24, 110, 19)89end if90end event919293// ========================94// Editor Events95// ========================9697event RSDKDraw98DrawSprite(0)99end event100101102event RSDKLoad103CheckCurrentStageFolder("Zone01")104if checkResult == true105LoadSpriteSheet("EHZ/Objects.gif")106SpriteFrame(-8, -8, 16, 16, 82, 78)107else108LoadSpriteSheet("MBZ/Objects.gif")109SpriteFrame(-8, -8, 16, 16, 137, 313)110end if111112SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")113end event114115116