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/DEZ/DERShoulder.txt
1483 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: DER Shoulder 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 1 : BODYPART_DESTROYED
13
14
15
// ========================
16
// Events
17
// ========================
18
19
event ObjectUpdate
20
if object.state == BODYPART_DESTROYED
21
object.xpos += object.xvel
22
object.ypos += object.yvel
23
object.yvel += 0x3800
24
25
if object.outOfBounds == true
26
object.type = TypeName[Blank Object]
27
end if
28
else
29
// Follow the main Death Egg Robot object
30
object.xpos = object[-5].xpos
31
if object.direction == FLIP_NONE
32
object.xpos += 0xC0000
33
else
34
object.xpos -= 0xC0000
35
end if
36
37
object.ypos = object[-5].ypos
38
object.ypos -= 0x140000
39
end if
40
end event
41
42
43
event ObjectDraw
44
DrawSpriteFX(object.frame, FX_FLIP, object.xpos, object.ypos)
45
end event
46
47
48
event ObjectStartup
49
CheckCurrentStageFolder("Zone12")
50
if checkResult == true
51
LoadSpriteSheet("DEZ/Objects.gif")
52
SpriteFrame(-16, -16, 32, 30, 356, 123)
53
else
54
LoadSpriteSheet("MBZ/Objects.gif")
55
SpriteFrame(-16, -16, 32, 30, 868, 123)
56
end if
57
end event
58
59
60
// ========================
61
// Editor Events
62
// ========================
63
64
event RSDKDraw
65
DrawSprite(0)
66
end event
67
68
69
event RSDKLoad
70
CheckCurrentStageFolder("Zone12")
71
if checkResult == true
72
LoadSpriteSheet("DEZ/Objects.gif")
73
SpriteFrame(-16, -16, 32, 30, 356, 123)
74
else
75
LoadSpriteSheet("MBZ/Objects.gif")
76
SpriteFrame(-16, -16, 32, 30, 868, 123)
77
end if
78
79
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
80
end event
81
82