Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R6/BossSpike.txt
1319 views
1
//-----------------Sonic CD Boss Spike 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
// States
9
#alias 0 : BOSSSPIKE_FALLING
10
#alias 1 : BOSSSPIKE_DESPAWN
11
12
// Collision Sides
13
#alias 0 : CSIDE_FLOOR
14
15
16
sub ObjectMain
17
if Object.State == BOSSSPIKE_FALLING
18
Object.YPos += 0x38000
19
ObjectTileCollision(CSIDE_FLOOR, 0, 12, 0)
20
if CheckResult == true
21
Object.State = BOSSSPIKE_DESPAWN
22
end if
23
else
24
Object.Timer++
25
if Object.Timer == 64
26
Object.Type = TypeName[Blank Object]
27
end if
28
end if
29
end sub
30
31
32
sub ObjectPlayerInteraction
33
if Object.State == BOSSSPIKE_FALLING
34
PlayerObjectCollision(C_TOUCH, -4, -12, 4, 12)
35
if CheckResult == true
36
CallFunction(Player_Hit)
37
end if
38
end if
39
end sub
40
41
42
sub ObjectDraw
43
TempValue0 = Object.Timer
44
TempValue0 &= 7
45
46
if TempValue0 < 4
47
DrawSprite(0)
48
end if
49
end sub
50
51
52
sub ObjectStartup
53
LoadSpriteSheet("R6/Objects2.gif")
54
55
SpriteFrame(-4, -12, 8, 24, 228, 1) // #0 - Boss Spike
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("R6/Objects2.gif")
70
71
SpriteFrame(-4, -12, 8, 24, 228, 1) // #0 - Boss Spike
72
73
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
74
end sub
75
76