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/HTZ/2PVsDeleter.txt
1480 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: 2P Vs Deleter 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.propertyValue : object.deleteCount
13
14
15
// ========================
16
// Events
17
// ========================
18
19
event ObjectUpdate
20
// There's nothing here
21
end event
22
23
24
event ObjectDraw
25
// The sequel to nothing here: nothing there
26
end event
27
28
29
event ObjectStartup
30
foreach (TypeName[2P Vs Deleter], arrayPos0, ALL_ENTITIES)
31
if options.vsMode == false
32
// If not in 2P, then delete these multiplayer helper objects
33
// (These objects are normally just platforms or etc, in place of lifts and other un-reusable objects)
34
temp0 = 0
35
arrayPos1 = arrayPos0
36
while temp0 < object[arrayPos0].deleteCount
37
arrayPos1++
38
object[arrayPos1].type = TypeName[Blank Object]
39
temp0++
40
loop
41
end if
42
next
43
end event
44
45
46
// ========================
47
// Editor Events
48
// ========================
49
50
event RSDKDraw
51
DrawSprite(0)
52
53
if editor.showGizmos == true
54
editor.drawingOverlay = true
55
56
temp0 = 0
57
arrayPos1 = object.entityPos
58
while temp0 < object.deleteCount
59
arrayPos1++
60
DrawLine(object.xpos, object.ypos, object[arrayPos1].xpos, object[arrayPos1].ypos, 0xFF, 0xFF, 0x00)
61
temp0++
62
loop
63
64
editor.drawingOverlay = false
65
end if
66
end event
67
68
69
event RSDKLoad
70
LoadSpriteSheet("Global/Display.gif")
71
SpriteFrame(-8, -8, 16, 16, 168, 18) // "trigger" - #0
72
73
SetVariableAlias(ALIAS_VAR_PROPVAL, "deleteCount")
74
end event
75
76