Path: blob/master/Sonic 2/Scripts/EHZ/ObjectActivator.txt
1480 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: Object Activator Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// This object's name isn't very descriptive, so while it does "activate" objects,8// it's usually used on both sides of a Spiral Path obj to make sure its active910// ========================11// Events12// ========================1314event ObjectUpdate15arrayPos0 = object.propertyValue16object[+arrayPos0].priority = PRIORITY_ACTIVE17end event181920// ========================21// Editor Events22// ========================2324event RSDKDraw25DrawSprite(0)2627if editor.showGizmos == true28editor.drawingOverlay = true2930// Draw a line to the object that'll be activated3132arrayPos0 = object.propertyValue33DrawArrow(object.xpos, object.ypos, object[+arrayPos0].xpos, object[+arrayPos0].ypos, 252, 252, 0)3435editor.drawingOverlay = false36end if37end event383940event RSDKLoad41LoadSpriteSheet("Global/Display.gif")42SpriteFrame(-8, -8, 16, 16, 168, 18) // "Trigger" - #04344SetVariableAlias(ALIAS_VAR_PROPVAL, "activateSlot")45end event464748