Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-1-Sonic-2-2013-Script-Decompilation
Path: blob/master/Sonic 1/Scripts/SYZ/BossBlock.txt
1483 views
1
// ----------------------------------
2
// RSDK Project: Sonic 1
3
// Script Description: Boss Block 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 0 : BOSSBLOCK_SOLID
13
private alias 1 : BOSSBLOCK_NONSOLID
14
15
private alias 0 : BOSSBLOCK_BLOCK
16
private alias 1 : BOSSBLOCK_DEBRIS
17
18
19
// ========================
20
// Events
21
// ========================
22
23
event ObjectUpdate
24
if object.propertyValue == BOSSBLOCK_BLOCK
25
if object.state == BOSSBLOCK_SOLID
26
foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)
27
BoxCollisionTest(C_SOLID, object.entityPos, -16, -16, 16, 16, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)
28
next
29
end if
30
else
31
object.yvel += 0x1800
32
object.xpos += object.xvel
33
object.ypos += object.yvel
34
35
if object.outOfBounds == true
36
object.type = TypeName[Blank Object]
37
end if
38
end if
39
end event
40
41
42
event ObjectDraw
43
DrawSprite(object.propertyValue)
44
end event
45
46
47
event ObjectStartup
48
LoadSpriteSheet("SYZ/Objects.gif")
49
SpriteFrame(-16, -16, 32, 32, 110, 152)
50
SpriteFrame(-8, -8, 16, 16, 110, 152)
51
SpriteFrame(-8, -8, 16, 16, 126, 152)
52
SpriteFrame(-8, -8, 16, 16, 110, 168)
53
SpriteFrame(-8, -8, 16, 16, 126, 168)
54
end event
55
56
57
// ========================
58
// Editor Events
59
// ========================
60
61
event RSDKDraw
62
DrawSprite(0)
63
end event
64
65
66
event RSDKLoad
67
LoadSpriteSheet("SYZ/Objects.gif")
68
SpriteFrame(-16, -16, 32, 32, 110, 152)
69
70
// Although used by the object, it shouldn't be set by the editor
71
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
72
end event
73
74