Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R3/OneWayPlat.txt
1319 views
1
//--------------Sonic CD One Way Platform Script--------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
// Aliases
6
#alias Object.Value0 : Object.YVelocity
7
8
9
sub ObjectPlayerInteraction
10
PlayerObjectCollision(C_PLATFORM, -32, -8, 32, 8)
11
end sub
12
13
14
sub ObjectDraw
15
if Player.YPos < Object.YPos
16
if Object.YVelocity < 0x400000
17
Object.YVelocity += 0x100000
18
end if
19
else
20
if Object.YVelocity > 0
21
Object.YVelocity -= 0x100000
22
end if
23
end if
24
25
TempValue0 = Object.XPos
26
TempValue0 += Object.YVelocity
27
28
DrawSpriteXY(0, TempValue0, Object.YPos)
29
end sub
30
31
32
sub ObjectStartup
33
LoadSpriteSheet("R3/Objects.gif")
34
35
SpriteFrame(-96, -8, 64, 16, 165, 1) // #0 - One Way Platform
36
end sub
37
38
39
// ========================
40
// Editor Subs
41
// ========================
42
43
sub RSDKDraw
44
DrawSprite(0)
45
46
if Editor.ShowGizmos == true
47
TempValue0 = Object.iXPos
48
TempValue0 -= 32
49
TempValue0 <<= 16
50
51
DrawArrow(TempValue0, Object.YPos, Object.XPos, Object.YPos, 255, 0, 0, 0)
52
end if
53
end sub
54
55
56
sub RSDKLoad
57
LoadSpriteSheet("R3/Objects.gif")
58
59
SpriteFrame(-96, -8, 64, 16, 165, 1) // #0 - One Way Platform
60
61
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
62
end sub
63
64