Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R5/BossExplosion.txt
1319 views
1
//---------------Sonic CD BossExplosion Script----------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
// Aliases
6
#alias Object.Value0 : Object.Timer
7
#alias Object.Value1 : Object.Loops
8
9
// Player Aliases
10
#alias 0 : PLAYER_SONIC_A
11
#alias 1 : PLAYER_TAILS_A
12
13
sub ObjectDraw
14
15
DrawSprite(Object.Frame)
16
17
// Make the Object rise by 3 pixels
18
Object.YPos -= 0x30000
19
20
// Animate the Explosion
21
22
Object.Timer++
23
if Object.Timer > 3
24
Object.Timer = 0
25
26
Object.Frame++
27
if Object.Frame > 4
28
Object.Frame = 0
29
30
Object.Loops++
31
if Object.Loops == 2
32
// Upon reaching the third loop, unload
33
Object.Type = TypeName[Blank Object]
34
end if
35
end if
36
end if
37
38
end sub
39
40
41
sub ObjectStartup
42
if Stage.PlayerListPos == PLAYER_SONIC_A // PLAYER_SONIC in origins
43
LoadSpriteSheet("Global/Items2.gif")
44
end if
45
if Stage.PlayerListPos == PLAYER_TAILS_A // PLAYER_TAILS in origins
46
LoadSpriteSheet("Global/Items2_t.gif")
47
end if
48
#platform: Use_Origins
49
if Stage.PlayerListPos == PLAYER_KNUCKLES
50
LoadSpriteSheet("Global/Items2_k.gif")
51
end if
52
if Stage.PlayerListPos == PLAYER_AMY
53
LoadSpriteSheet("Global/Items2_a.gif")
54
end if
55
#endplatform
56
57
// Explosion Frames
58
59
SpriteFrame(-16, -8, 32, 16, 1, 1)
60
SpriteFrame(-16, -16, 32, 32, 1, 84)
61
SpriteFrame(-16, -16, 32, 32, 1, 117)
62
SpriteFrame(-24, -24, 48, 48, 34, 1)
63
SpriteFrame(-24, -24, 48, 48, 34, 50)
64
65
end sub
66
67
68
// ========================
69
// Editor Subs
70
// ========================
71
72
sub RSDKDraw
73
DrawSprite(0)
74
end sub
75
76
77
sub RSDKLoad
78
LoadSpriteSheet("Global/Items2.gif")
79
SpriteFrame(-16, -8, 32, 16, 1, 1)
80
81
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
82
end sub
83
84