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/Mission/Boss3Safty.txt
1483 views
1
// ----------------------------------
2
// RSDK Project: Sonic 1
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 used in Spring Yard's Boss Rush stage (BR3 - BR3Zone03)
9
10
// ========================
11
// Aliases
12
// ========================
13
14
// Player Aliases
15
private alias object.iypos : player.iypos
16
17
18
// ========================
19
// Events
20
// ========================
21
22
event ObjectUpdate
23
if game.missionCondition == MISSION_CONDITION_CLEAR
24
// If the Boss is defeated, then make sure the Player doesn't fall through the floor and die
25
if player[0].iypos >= 0x580
26
player[0].iypos = 0x580
27
end if
28
end if
29
end event
30
31
32
// ========================
33
// Editor Events
34
// ========================
35
36
event RSDKDraw
37
DrawSprite(0)
38
39
if editor.drawgizmos == true
40
temp0 = object.xpos
41
temp0 -= 0x200000
42
43
editor.drawingOverlay = true
44
45
// todo: idr if w/h is screen-space or not
46
// this prolly doesn't work at all either
47
DrawRectWorld(temp0, 0x5800000, 0x400000, 0x20000, 255, 0, 255, 255)
48
DrawLine(object.xpos, object.ypos, object.xpos, 0x5800000, 255, 0, 255)
49
50
editor.drawingOverlay = true
51
end if
52
end event
53
54
55
event RSDKLoad
56
LoadSpriteSheet("Global/Display.gif")
57
SpriteFrame(-16, -16, 32, 32, 1, 143)
58
59
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
60
end event
61
62