Path: blob/master/Sonic 2/Scripts/WFZ/VPropeller.txt
1478 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: V Propeller Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Function Declarations9// ========================1011reserve function VPropeller_DebugDraw12reserve function VPropeller_DebugSpawn131415// ========================16// Function Definitions17// ========================1819private function VPropeller_DebugDraw20DrawSprite(0)21end function222324private function VPropeller_DebugSpawn25CreateTempObject(TypeName[V Propeller], 0, object.xpos, object.ypos)26end function272829// ========================30// Events31// ========================3233event ObjectUpdate34temp0 = object.xpos35temp0 >>= 1636temp0 -= camera[0].xpos37Abs(temp0)38temp0 -= 9639if temp0 < screen.xcenter40temp0 = object.ypos41temp0 >>= 1642temp0 -= camera[0].ypos43Abs(temp0)44if temp0 < 16045temp0 = oscillation46temp0 &= 0x1F47if temp0 == 048PlaySfx(SfxName[Helicopter], false)49end if50end if51end if5253foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)54BoxCollisionTest(C_TOUCH, object.entityPos, -4, -64, 4, 64, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)55if checkResult == true56CallFunction(Player_Hit)57end if58next59end event606162event ObjectDraw63DrawSprite(WFZSetup_vPropellerFrame)64end event656667event ObjectStartup68LoadSpriteSheet("SCZ/Objects.gif")69SpriteFrame(-4, -64, 8, 64, 121, 106)70SpriteFrame(-4, -32, 8, 64, 121, 106)71SpriteFrame(-4, 0, 8, 64, 121, 106)7273SetTableValue(TypeName[V Propeller], DebugMode_ObjCount, DebugMode_TypesTable)74SetTableValue(VPropeller_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)75SetTableValue(VPropeller_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)76DebugMode_ObjCount++77end event787980// ========================81// Editor Events82// ========================8384event RSDKDraw85DrawSprite(0)86end event878889event RSDKLoad90LoadSpriteSheet("SCZ/Objects.gif")91SpriteFrame(-4, -64, 8, 64, 121, 106)9293SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")94end event959697