Path: blob/master/Sonic 2/Scripts/MCZ/StaticBlock.txt
1479 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: Static Block Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Function Declarations9// ========================1011reserve function StaticBlock_DebugDraw12reserve function StaticBlock_DebugSpawn131415// ========================16// Function Definitions17// ========================1819private function StaticBlock_DebugDraw20DrawSprite(0)21end function222324private function StaticBlock_DebugSpawn25CreateTempObject(TypeName[Static Block], 0, object.xpos, object.ypos)26end function272829// ========================30// Events31// ========================3233event ObjectUpdate34foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)35// Just act as a small box for the player36BoxCollisionTest(C_SOLID, object.entityPos, -16, -16, 16, 16, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)37next38end event394041event ObjectDraw42// Interesting note - this object has its Y direction flipped one time in the Act 1 scene file,43// but the drawing here just uses the standard sprite drawing function rather than FX_FLIP.44// I wonder what's up with that...4546DrawSprite(0)47end event484950event ObjectStartup51LoadSpriteSheet("MCZ/Objects.gif")5253// 0 - Wood post frame54SpriteFrame(-16, -16, 32, 32, 70, 0)5556// Add this object to the debug item list57SetTableValue(TypeName[Static Block], DebugMode_ObjCount, DebugMode_TypesTable)58SetTableValue(StaticBlock_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)59SetTableValue(StaticBlock_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)60DebugMode_ObjCount++61end event626364// ========================65// Editor Events66// ========================6768event RSDKDraw69DrawSprite(0)70end event717273event RSDKLoad74LoadSpriteSheet("MCZ/Objects.gif")75SpriteFrame(-16, -16, 32, 32, 70, 0)7677SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")78end event798081