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/Mission/BossSafty.txt
1482 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: Safty Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
// This Object is normally used in the Boss Rush for CPZ and OOZ - BR2/BR2Zone02 and BR7/BR2Zone07, respectively
9
10
// ========================
11
// Aliases
12
// ========================
13
14
private alias object.ypos : player.ypos
15
16
17
// ========================
18
// Events
19
// ========================
20
21
event ObjectUpdate
22
if game.missionCondition == MISSION_CONDITION_CLEAR
23
// If the Boss is defeated, then make sure the Player doesn't fall below where this Object is and die
24
if player[0].ypos >= object.ypos
25
player[0].ypos = object.ypos
26
end if
27
end if
28
end event
29
30
31
// ========================
32
// Editor Events
33
// ========================
34
35
event RSDKDraw
36
DrawSprite(0)
37
38
// Ignoring editor.showGizmos on purpose
39
40
editor.drawingOverlay = true
41
42
temp0 = object.xpos
43
temp0 -= 0x200000
44
temp1 = temp0
45
temp1 += 0x400000
46
DrawLine(temp0, object.ypos, temp1, object.ypos, 255, 255, 255)
47
48
editor.drawingOverlay = false
49
end event
50
51
52
event RSDKLoad
53
LoadSpriteSheet("Global/Display.gif")
54
SpriteFrame(-8, -8, 16, 16, 127, 113)
55
56
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
57
end event
58
59