Path: blob/master/Sonic 2/Scripts/Enemies/CluckerBase.txt
1480 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: Clucker Base Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Function Declarations9// ========================1011reserve function CluckerBase_DebugDraw12reserve function CluckerBase_DebugSpawn131415// ========================16// Function Definitions17// ========================1819private function CluckerBase_DebugDraw20DrawSprite(0)21end function222324private function CluckerBase_DebugSpawn25CreateTempObject(TypeName[Clucker Base], 0, object.xpos, object.ypos)26end function272829// ========================30// Events31// ========================3233event ObjectUpdate34foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)35BoxCollisionTest(C_SOLID, object.entityPos, -16, -8, 16, 8, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)36next37end event383940event ObjectDraw41DrawSprite(0)42end event434445event ObjectStartup46CheckCurrentStageFolder("Zone11")47if checkResult == true48LoadSpriteSheet("SCZ/Objects.gif")49SpriteFrame(-24, -8, 48, 16, 1, 206)5051// Hm?52// Why is this part in the zone folder check if it's the same between both?53SetTableValue(TypeName[Clucker Base], DebugMode_ObjCount, DebugMode_TypesTable)54SetTableValue(CluckerBase_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)55SetTableValue(CluckerBase_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)56DebugMode_ObjCount++57else58LoadSpriteSheet("MBZ/Objects.gif")59SpriteFrame(-24, -8, 48, 16, 576, 289)6061// The same as the SCZ addition type above, not quite sure why it's separate here...62SetTableValue(TypeName[Clucker Base], DebugMode_ObjCount, DebugMode_TypesTable)63SetTableValue(CluckerBase_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)64SetTableValue(CluckerBase_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)65DebugMode_ObjCount++66end if67end event686970// ========================71// Editor Events72// ========================7374event RSDKDraw75DrawSprite(0)76end event777879event RSDKLoad80CheckCurrentStageFolder("Zone11")81if checkResult == true82LoadSpriteSheet("SCZ/Objects.gif")83SpriteFrame(-24, -8, 48, 16, 1, 206)84else85LoadSpriteSheet("MBZ/Objects.gif")86SpriteFrame(-24, -8, 48, 16, 576, 289)87end if8889SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")90end event919293