Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R3/Bomb.txt
1319 views
1
//----------------Sonic CD Ladybug Bomb 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
8
// Collision Sides
9
#alias 0 : CSIDE_FLOOR
10
11
// Global SFX
12
#alias 22 : SFX_G_EXPLOSION
13
14
15
sub ObjectMain
16
if Object.OutOfBounds == true
17
Object.Type = TypeName[Blank Object]
18
end if
19
20
if Object.Timer < 240
21
Object.Timer++
22
else
23
Object.Type = TypeName[Blank Object]
24
CreateTempObject(TypeName[Explosion], 0, Object.XPos, Object.YPos)
25
PlaySfx(SFX_G_EXPLOSION, false)
26
end if
27
28
if Object.Timer > 120
29
Object.Frame = Object.Timer
30
Object.Frame &= 3
31
Object.Frame >>= 1
32
end if
33
34
ObjectTileGrip(CSIDE_FLOOR, 0, 8, 0)
35
end sub
36
37
38
sub ObjectPlayerInteraction
39
PlayerObjectCollision(C_TOUCH, -8, -8, 8, 8)
40
if CheckResult == true
41
CallFunction(Player_Hit)
42
end if
43
end sub
44
45
46
sub ObjectDraw
47
DrawSprite(Object.Frame)
48
end sub
49
50
51
sub ObjectStartup
52
LoadSpriteSheet("R3/Objects.gif")
53
54
SpriteFrame(-8, -8, 16, 16, 223, 153) // #0 - Bomb Frame 0
55
SpriteFrame(-8, -8, 16, 16, 240, 153) // #1 - Bomb Frame 1
56
end sub
57
58
59
// ========================
60
// Editor Subs
61
// ========================
62
63
sub RSDKDraw
64
DrawSprite(0)
65
end sub
66
67
68
sub RSDKLoad
69
LoadSpriteSheet("R3/Objects.gif")
70
71
SpriteFrame(-8, -8, 16, 16, 223, 153) // #0 - Bomb
72
73
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
74
end sub
75
76