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/Credits/UnlockTest.txt
1483 views
1
// ----------------------------------
2
// RSDK Project: Sonic 1
3
// Script Description: Unlock Test Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
// ========================
9
// Aliases
10
// ========================
11
12
// Achievement Aliases
13
// Only really the last one is used in this script, but may as well list the rest for reference anyway
14
// (Also yeah all the code for these Achievements is still in Origins's scripts lol)
15
16
// "Ramp Ring Acrobatics" - "Without touching the ground, collect all the rings in a trapezoid formation in Green Hill Zone Act 1"
17
private alias 0 : ACHIEVEMENT_RAMPRINGACRO
18
19
// "Blast Processing" - "Clear Green Hill Zone Act 1 in under 30 seconds"
20
private alias 1 : ACHIEVEMENT_BLASTPROCESSING
21
22
// "Secret of Marble Zone" - "Travel though a secret room in Marbale Zone Act 3"
23
private alias 2 : ACHIEVEMENT_SECRETOFMZ
24
25
// "Block Buster" - "Break 16 blocks in a row without stopping" (in Marble Zone)
26
private alias 3 : ACHIEVEMENT_BLOCKBUSTER
27
28
// "Ring King" - "Collect 200 Rings"
29
private alias 4 : ACHIEVEMENT_RINGKING
30
31
// "Secret of Labyrinth Zone" - "Activate and ride the hidden platform in Labyrinth Zone Act 1"
32
private alias 5 : ACHIEVEMENT_SECRETOFLZ
33
34
// "Flawless Pursuit" - "Clear the boss in Labyrinth Zone without getting hurt"
35
private alias 6 : ACHIEVEMENT_FLAWLESSPURSUIT
36
37
// "Bombs Away" - "Defeat the boss in Starlight Zone using only the see-saw bombs"
38
private alias 7 : ACHIEVEMENT_BOMBSAWAY
39
40
// "Hidden Transporter" - "Collect 50 Rings and take the hidden transporter path in Scrap Brain Act 2"
41
private alias 8 : ACHIEVEMENT_HIDDENTRANSPORTER
42
43
// "Chaos Connoisseur" - "Collect all the chaos emeralds"
44
private alias 9 : ACHIEVEMENT_CHAOSCONNOISSEUR
45
46
// "One For the Road" - "As a parting gift, land a final hit on Dr. Eggman's escaping Egg Mobile"
47
private alias 10 : ACHIEVEMENT_ONEFORTHEROAD
48
49
// "Beat The Clock" - "Clear the Time Attack mode in less than 45 minutes" (do note that this isn't normally unlocked through scripts, instead it's unlocked by the fancy 3d menu side of things)
50
private alias 11 : ACHIEVEMENT_BEATTHECLOCK
51
52
// Total count, nothing special to say about this one
53
private alias 12 : ACHIEVEMENT_COUNT
54
55
56
// ========================
57
// Events
58
// ========================
59
60
event ObjectUpdate
61
// This object is meant to unlock all achievments, so cycle through all of them while unlocking each
62
temp0 = 0
63
while temp0 < ACHIEVEMENT_COUNT
64
CallNativeFunction2(SetAchievement, temp0, 100)
65
temp0++
66
loop
67
68
// Erase this object and reset the game
69
object.type = TypeName[Blank Object]
70
engine.state = RESET_GAME
71
end event
72
73
74
event ObjectStartup
75
// Hide Touch Controls
76
77
options.touchControls = false
78
end event
79
80
81
// ========================
82
// Editor Events
83
// ========================
84
85
event RSDKDraw
86
DrawSprite(0)
87
end event
88
89
90
event RSDKLoad
91
LoadSpriteSheet("Global/Display.gif")
92
SpriteFrame(-16, -16, 32, 32, 1, 143)
93
94
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
95
end event
96
97