Path: blob/master/Sonic 2/Scripts/SCZ/ObjectActivator.txt
1478 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: Object Activator Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// Object Name is a bit general, while yes this does indeed activate objects,8// it's used pretty much only for triplets of Nebulas since they should all by synced together910// ========================11// Aliases12// ========================1314private alias object.propertyValue : object.activateCount151617// ========================18// Events19// ========================2021event ObjectUpdate22// Activate some following objects2324arrayPos0 = object.entityPos25arrayPos0++2627temp0 = 02829while temp0 < object.activateCount30object[arrayPos0].priority = PRIORITY_ACTIVE31arrayPos0++32temp0++33loop3435// Clear this object, it's no longer needed36object.type = TypeName[Blank Object]37end event383940// ========================41// Editor Events42// ========================4344event RSDKDraw45DrawSprite(0)4647if editor.showGizmos == true48// draw a line to the objects that'll be activated4950temp0 = 051arrayPos1 = object.entityPos52while temp0 < object.activateCount53arrayPos1++54DrawLine(object.xpos, object.ypos, object[arrayPos1].xpos, object[arrayPos1].ypos, 0xFF, 0xFF, 0x00)55temp0++56loop57end if58end event596061event RSDKLoad62LoadSpriteSheet("Global/Display.gif")63SpriteFrame(-8, -8, 16, 16, 168, 18) // "Trigger" - #06465SetVariableAlias(ALIAS_VAR_PROPVAL, "activateCount")66end event676869