Path: blob/master/Sonic 2/Scripts/HTZ/EggmanFireball2.txt
1482 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: Eggman Fireball2 Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011// GroundFlame Aliases12private alias object.value0 : groundFlame.timer1314// Path ID Aliases15private alias 0 : PATH_A161718// ========================19// Events20// ========================2122event ObjectUpdate23object.xpos += object.xvel24object.ypos += object.yvel25object.yvel += 0x38002627// Check if the object's touched the ground28ObjectTileCollision(CSIDE_FLOOR, 0, 8, PATH_A)29if checkResult == true30// Create ground flames along the floor31PlaySfx(SfxName[Flame Thrower], false)32CreateTempObject(TypeName[Ground Flame], 0, object.xpos, object.ypos)33groundFlame[tempObjectPos].timer = 334if object.xvel < 035object[tempObjectPos].direction = FLIP_NONE36object[tempObjectPos].xpos -= 0x2000037else38object[tempObjectPos].direction = FLIP_X39object[tempObjectPos].xpos += 0x2000040end if41object.type = TypeName[Blank Object]42end if4344// Animate the object45object.frame = object.animationTimer46object.frame >>= 247object.animationTimer++48object.animationTimer &= 74950if object.outOfBounds == true51object.type = TypeName[Blank Object]52end if5354foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)55BoxCollisionTest(C_TOUCH, object.entityPos, -8, -8, 8, 8, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)56if checkResult == true57CallFunction(Player_FireHit)58end if59next60end event616263event ObjectDraw64DrawSprite(object.frame)65end event666768event ObjectStartup69CheckCurrentStageFolder("Zone05")70if checkResult == true71LoadSpriteSheet("HTZ/Objects.gif")72SpriteFrame(-8, -8, 16, 16, 191, 94)73SpriteFrame(-8, -8, 16, 16, 191, 110)74else75LoadSpriteSheet("MBZ/Objects.gif")76SpriteFrame(-8, -8, 16, 16, 1008, 1)77SpriteFrame(-8, -8, 16, 16, 1008, 17)78end if79end event808182event RSDKDraw83DrawSprite(0)84end event858687event RSDKLoad88CheckCurrentStageFolder("Zone05")89if checkResult == true90LoadSpriteSheet("HTZ/Objects.gif")91SpriteFrame(-8, -8, 16, 16, 191, 94)92else93LoadSpriteSheet("MBZ/Objects.gif")94SpriteFrame(-8, -8, 16, 16, 1008, 1)95end if9697SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")98end event99100101