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/LZ/GargoyleShot.txt
1482 views
1
// ----------------------------------
2
// RSDK Project: Sonic 1
3
// Script Description: Gargoyle Shot 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 object.value0 : object.timer
13
14
// Path ID Aliases
15
private alias 0 : PATH_A
16
17
18
// ========================
19
// Events
20
// ========================
21
22
event ObjectUpdate
23
object.xpos += object.xvel
24
25
if object.xvel < 0
26
ObjectTileCollision(CSIDE_RWALL, -8, 4, PATH_A)
27
else
28
ObjectTileCollision(CSIDE_LWALL, 8, 4, PATH_A)
29
end if
30
31
if checkResult == true
32
object.type = TypeName[Blank Object]
33
end if
34
35
if object.timer < 16
36
object.timer++
37
else
38
object.drawOrder = 3
39
end if
40
41
object.frame = oscillation
42
object.frame >>= 3
43
object.frame &= 1
44
45
foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)
46
BoxCollisionTest(C_TOUCH, object.entityPos, -4, -4, 4, 4, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)
47
if checkResult == true
48
CallFunction(Player_FireHit)
49
end if
50
next
51
end event
52
53
54
event ObjectDraw
55
DrawSpriteFX(object.frame, FX_FLIP, object.xpos, object.ypos)
56
end event
57
58
59
event ObjectStartup
60
LoadSpriteSheet("LZ/Objects.gif")
61
62
SpriteFrame(-8, -3, 15, 6, 127, 124)
63
SpriteFrame(-8, -3, 15, 6, 127, 131)
64
end event
65
66
67
// ========================
68
// Editor Events
69
// ========================
70
71
event RSDKDraw
72
DrawSprite(0)
73
end event
74
75
76
event RSDKLoad
77
LoadSpriteSheet("LZ/Objects.gif")
78
SpriteFrame(-8, -3, 15, 6, 127, 124)
79
end event
80
81