Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-1-Sonic-2-2013-Script-Decompilation
Path: blob/master/Sonic 2/Scripts/EHZ/ObjectActivator.txt
1480 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: Object Activator Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
// This object's name isn't very descriptive, so while it does "activate" objects,
9
// it's usually used on both sides of a Spiral Path obj to make sure its active
10
11
// ========================
12
// Events
13
// ========================
14
15
event ObjectUpdate
16
arrayPos0 = object.propertyValue
17
object[+arrayPos0].priority = PRIORITY_ACTIVE
18
end event
19
20
21
// ========================
22
// Editor Events
23
// ========================
24
25
event RSDKDraw
26
DrawSprite(0)
27
28
if editor.showGizmos == true
29
editor.drawingOverlay = true
30
31
// Draw a line to the object that'll be activated
32
33
arrayPos0 = object.propertyValue
34
DrawArrow(object.xpos, object.ypos, object[+arrayPos0].xpos, object[+arrayPos0].ypos, 252, 252, 0)
35
36
editor.drawingOverlay = false
37
end if
38
end event
39
40
41
event RSDKLoad
42
LoadSpriteSheet("Global/Display.gif")
43
SpriteFrame(-8, -8, 16, 16, 168, 18) // "Trigger" - #0
44
45
SetVariableAlias(ALIAS_VAR_PROPVAL, "activateSlot")
46
end event
47
48