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/Global/LightningSpark.txt
1482 views
1
// ----------------------------------
2
// RSDK Project: Sonic 1
3
// Script Description: Lightning Spark 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.value18 : player.currentPlane
13
14
event ObjectUpdate
15
// Match the player's visual plane
16
object.drawOrder = player[0].currentPlane
17
18
object.xpos += object.xvel
19
object.ypos += object.yvel
20
21
// Cycle through 3 frames
22
object.frame++
23
if object.frame >= 3
24
object.frame = 0
25
end if
26
27
object.animationTimer++
28
29
// Unload after ~half a second
30
if object.animationTimer >= 22
31
object.type = TypeName[Blank Object]
32
end if
33
end event
34
35
36
event ObjectDraw
37
DrawSpriteFX(object.frame, FX_FLIP, object.xpos, object.ypos)
38
end event
39
40
41
event ObjectStartup
42
LoadSpriteSheet("Global/Items3.gif")
43
SpriteFrame(0, 0, 1, 1, 1, 1)
44
SpriteFrame(-3, -3, 6, 6, 150, 84)
45
SpriteFrame(-8, -8, 16, 16, 157, 84)
46
end event
47
48
49
event RSDKDraw
50
DrawSprite(0)
51
end event
52
53
54
event RSDKLoad
55
LoadSpriteSheet("Global/Items3.gif")
56
SpriteFrame(-8, -8, 16, 16, 157, 84)
57
58
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
59
end event
60
61