Path: blob/master/Sonic 2/Scripts/Mission/MissionBlockCollisionM027.txt
1480 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: MBC_M027 Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011// Octus Aliases12private alias object.value0 : object.timer1314private alias 0 : OCTUS_SETUP15private alias 4 : OCTUS_FALL161718// ========================19// Events20// ========================2122event ObjectUpdate23foreach (TypeName[MissionBlock], arrayPos0, ACTIVE_ENTITIES)24foreach (TypeName[Octus], arrayPos1, ACTIVE_ENTITIES)25// Have each Mission Block in the level check against collision for each Octus in the level26BoxCollisionTest(C_SOLID, arrayPos0, -16, -16, 16, 16, arrayPos1, -21, -12, 21, 13)27if checkResult == COL_TOP28if object[arrayPos1].state == OCTUS_FALL29// If the Octus is falling, then make it assume the Mission Block is normal ground30object[arrayPos1].timer = 031object[arrayPos1].yvel = 032object[arrayPos1].animationTimer = 033object[arrayPos1].state = OCTUS_SETUP34end if35end if36next37next38end event394041event ObjectDraw42// huh?43// This object doesn't have a sheet loaded, nor any Sprite Frames, so what's this doing here...?44// And because the object is PRIORITY_ACTIVE, this is *always* getting drawn, at all times offscreen45DrawSprite(0)46end event474849event ObjectStartup50// See if we're in the OOZ Mission folder and in act 151CheckCurrentStageFolder("Mission_Zone07")52temp0 = checkResult53CheckEqual(stage.actNum, 1)54temp0 &= checkResult55if temp0 == true56// If we are, then make each Mission Block Collision for Mission 27 Object active57foreach (TypeName[MBC_M027], arrayPos0, ALL_ENTITIES)58object[arrayPos0].priority = PRIORITY_ACTIVE59next60else61// If we aren't, then delete each Mission Block Collision for Mission 27 Object in the scene62// Quite the mouthful, isn't it?63foreach (TypeName[MBC_M027], arrayPos0, ALL_ENTITIES)64object[arrayPos0].type = TypeName[Blank Object]65next66end if67end event686970// ========================71// Editor Events72// ========================7374event RSDKDraw75DrawSprite(0)76end event777879event RSDKLoad80LoadSpriteSheet("Global/Display.gif")81SpriteFrame(-16, -16, 32, 32, 1, 143)8283SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")84end event858687