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/WFZ/EggmanThruster.txt
1487 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: Eggman Thruster Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
// ========================
9
// Aliases
10
// ========================
11
12
private alias object.value0 : object.interval
13
14
15
// ========================
16
// Events
17
// ========================
18
19
event ObjectUpdate
20
// empty :(
21
end event
22
23
24
event ObjectDraw
25
temp0 = oscillation
26
temp0 += object.propertyValue
27
temp0 &= 1
28
temp0 &= object.interval
29
if temp0 == 1
30
DrawSprite(0)
31
end if
32
end event
33
34
35
event ObjectStartup
36
LoadSpriteSheet("SCZ/Objects.gif")
37
SpriteFrame(-16, -14, 32, 28, 203, 90)
38
39
foreach (TypeName[Eggman Thruster], arrayPos0, ALL_ENTITIES)
40
if object[arrayPos0].propertyValue == 0
41
object[arrayPos0].interval = 1
42
end if
43
next
44
end event
45
46
47
// ========================
48
// Editor Events
49
// ========================
50
51
event RSDKEdit
52
if editor.returnVariable == true
53
switch editor.variableID
54
case EDIT_VAR_PROPVAL // property value
55
checkResult = object.propertyValue
56
break
57
58
case 0 // type
59
checkResult = object.propertyValue
60
break
61
62
end switch
63
else
64
switch editor.variableID
65
case EDIT_VAR_PROPVAL // property value
66
object.propertyValue = editor.variableValue
67
break
68
69
case 0 // type
70
object.propertyValue = editor.variableValue
71
break
72
73
end switch
74
end if
75
end event
76
77
78
event RSDKDraw
79
DrawSprite(0)
80
end event
81
82
83
event RSDKLoad
84
LoadSpriteSheet("SCZ/Objects.gif")
85
SpriteFrame(-16, -14, 32, 28, 203, 90)
86
87
AddEditorVariable("type")
88
SetActiveVariable("type")
89
AddEnumVariable("Start Active", 0)
90
AddEnumVariable("Start Inactive", 1)
91
end event
92
93