Path: blob/master/Sonic 2/Scripts/Mission/MissionBlock.txt
1480 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: MissionBlock Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011// Player Aliases12private alias object.type : player.type13private alias object.state : player.state1415// Reserved Object Slot Aliases16private alias 0 : SLOT_PLAYER117private alias 1 : SLOT_PLAYER2181920// ========================21// Events22// ========================2324event ObjectUpdate25if player[SLOT_PLAYER1].state != Player_State_Drown26BoxCollisionTest(C_SOLID, object.entityPos, -16, -16, 16, 16, SLOT_PLAYER1, C_BOX, C_BOX, C_BOX, C_BOX)2728if player[SLOT_PLAYER2].type != TypeName[Blank Object] // Shields are legally players, I guess29// If Tails is with Sonic (the only mission this would apply to is Bodyguard), check against them too30// No check if they're drowning or anything, just assume they're alive31BoxCollisionTest(C_SOLID, object.entityPos, -16, -16, 16, 16, SLOT_PLAYER2, C_BOX, C_BOX, C_BOX, C_BOX)32end if33end if34end event353637event ObjectDraw38DrawSprite(0)39end event404142event ObjectStartup43LoadSpriteSheet("Mission/Objects.gif")44SpriteFrame(-16, -16, 32, 32, 1, 18) // Mission Block Frame45end event464748// ========================49// Editor Events50// ========================5152event RSDKDraw53DrawSprite(0)54end event555657event RSDKLoad58LoadSpriteSheet("Mission/Objects.gif")59SpriteFrame(-16, -16, 32, 32, 1, 18)6061SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")62end event636465