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/MZ/ShortcutCheck.txt
1483 views
1
// ----------------------------------
2
// RSDK Project: Sonic 1
3
// Script Description: Shortcut Check Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
// ========================
9
// Aliases
10
// ========================
11
12
// Player Aliases
13
private alias 0 : SLOT_PLAYER1
14
15
// Achievement Aliases
16
private alias 2 : ACHIEVEMENT_SECRETOFMZ
17
18
19
// ========================
20
// Events
21
// ========================
22
23
event ObjectUpdate
24
// Check interaction with player 1
25
BoxCollisionTest(C_TOUCH, object.entityPos, -16, -64, 16, 64, SLOT_PLAYER1, C_BOX, C_BOX, C_BOX, C_BOX)
26
if checkResult == true
27
if stage.debugMode == false
28
// Grant the "Secret of Marble Zone" Achievement
29
CallNativeFunction2(SetAchievement, ACHIEVEMENT_SECRETOFMZ, 100)
30
end if
31
32
// This object serves no purpose anymore, so we may as well clear it now
33
object.type = TypeName[Blank Object]
34
end if
35
end event
36
37
38
// ========================
39
// Editor Events
40
// ========================
41
42
event RSDKDraw
43
DrawSprite(0)
44
45
if editor.showGizmos == true
46
editor.drawingOverlay = true
47
48
// Draw the sensor hitbox
49
temp0 = 16; temp1 = 64; temp2 = 16; temp3 = 64;
50
CallFunction(EditorHelpers_DrawHitbox)
51
52
editor.drawingOverlay = false
53
end if
54
end event
55
56
57
event RSDKLoad
58
LoadSpriteSheet("Global/Display.gif")
59
SpriteFrame(-8, -8, 16, 16, 239, 239) // "Trigger"
60
61
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
62
end event
63
64