Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-1-Sonic-2-2013-Script-Decompilation
Path: blob/master/Sonic 2/Scripts/HTZ/EggmanFireball1.txt
1480 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: Eggman Fireball1 Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
9
event ObjectUpdate
10
object.xpos += object.xvel
11
12
// Animate the object
13
object.frame = object.animationTimer
14
object.frame >>= 2
15
object.animationTimer++
16
object.animationTimer &= 7
17
18
if object.outOfBounds == true
19
object.type = TypeName[Blank Object]
20
end if
21
22
// Check interaction with players
23
foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)
24
BoxCollisionTest(C_TOUCH, object.entityPos, -4, -4, 4, 4, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)
25
if checkResult == true
26
CallFunction(Player_FireHit)
27
end if
28
next
29
end event
30
31
32
event ObjectDraw
33
DrawSpriteFX(object.frame, FX_FLIP, object.xpos, object.ypos)
34
end event
35
36
37
event ObjectStartup
38
CheckCurrentStageFolder("Zone05")
39
if checkResult == true
40
LoadSpriteSheet("HTZ/Objects.gif")
41
SpriteFrame(-4, -4, 8, 8, 158, 95)
42
SpriteFrame(-4, -4, 8, 8, 166, 95)
43
else
44
LoadSpriteSheet("MBZ/Objects.gif")
45
SpriteFrame(-4, -4, 8, 8, 480, 179)
46
SpriteFrame(-4, -4, 8, 8, 488, 179)
47
end if
48
end event
49
50
51
event RSDKDraw
52
DrawSprite(0)
53
end event
54
55
56
event RSDKLoad
57
CheckCurrentStageFolder("Zone05")
58
if checkResult == true
59
LoadSpriteSheet("HTZ/Objects.gif")
60
SpriteFrame(-4, -4, 8, 8, 158, 95)
61
else
62
LoadSpriteSheet("MBZ/Objects.gif")
63
SpriteFrame(-4, -4, 8, 8, 480, 179)
64
end if
65
66
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
67
end event
68
69