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/Special/RingReminder.txt
1483 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: Rings Reminder 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.value1 : object.localPos.x // unused, required for halfpipe stuff though
13
private alias object.value2 : object.localPos.y // unused, required for halfpipe stuff though
14
private alias object.value3 : object.localPos.z
15
private alias object.value4 : object.worldPos.x // unused, required for halfpipe stuff though
16
private alias object.value5 : object.worldPos.y // unused, required for halfpipe stuff though
17
private alias object.value6 : object.worldPos.z // unused, required for halfpipe stuff though
18
19
// Text Message Property Values
20
private alias 3 : TEXTMESSAGE_RINGREMINDER
21
22
// Player Aliases
23
private alias object.value14 : player.localPos.z
24
25
26
// ========================
27
// Events
28
// ========================
29
30
event ObjectUpdate
31
foreach (TypeName[Player Object], currentPlayer, ACTIVE_ENTITIES)
32
temp1 = object.localPos.z
33
temp1 -= 0x20000
34
temp2 = object.localPos.z
35
temp2 += 0x20000
36
if player[currentPlayer].localPos.z > temp1
37
if player[currentPlayer].localPos.z < temp2
38
ResetObjectEntity(object.entityPos, TypeName[Blank Object], 0, 0, 0)
39
ResetObjectEntity(11, TypeName[Text Message], TEXTMESSAGE_RINGREMINDER, 0, 0)
40
object[11].priority = PRIORITY_ACTIVE
41
#platform: USE_STANDALONE
42
object[11].drawOrder = 5
43
#endplatform
44
#platform: USE_ORIGINS
45
object[11].drawOrder = 6
46
#endplatform
47
end if
48
end if
49
next
50
end event
51
52
53
// ========================
54
// Editor Events
55
// ========================
56
57
event RSDKDraw
58
DrawSprite(0)
59
end event
60
61
62
event RSDKLoad
63
LoadSpriteSheet("Special/Objects.gif")
64
SpriteFrame(-8, -8, 16, 16, 348, 83)
65
66
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
67
end event
68
69