Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R8/ConveyorWheel.txt
1319 views
1
//--------------Sonic CD Conveyor Wheel Script----------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
// Aliases
6
#alias 0 : GRAVITY_GROUND
7
8
9
sub ObjectPlayerInteraction
10
PlayerObjectCollision(C_TOUCH, -64, -64, 64, 64)
11
if CheckResult == true
12
#platform: Use_Origins
13
if Player.State == Player_State_GlideSlide
14
Player.State = Player_State_Ground
15
CallFunction(Player_HandleOnGround)
16
Player.Skidding = 0
17
end if
18
#endplatform
19
20
if Player.Gravity == GRAVITY_GROUND
21
if Player.Speed < 0x50000
22
Player.Speed = 0x50000
23
else
24
if Player.Speed > 0x100000
25
Player.Speed = 0x100000
26
end if
27
end if
28
end if
29
end if
30
end sub
31
32
33
// ========================
34
// Editor Subs
35
// ========================
36
37
sub RSDKDraw
38
if Editor.ShowGizmos == true
39
Editor.DrawingOverlay = true
40
TempValue0 = Object.iXPos
41
TempValue0 -= 64
42
TempValue0 <<= 16
43
TempValue1 = Object.iYPos
44
TempValue1 -= 64
45
TempValue1 <<= 16
46
DrawRectOutline(TempValue0, TempValue1, 128, 128, 255, 255, 0, 255)
47
Editor.DrawingOverlay = false
48
end if
49
DrawSprite(0)
50
end sub
51
52
53
sub RSDKLoad
54
LoadSpriteSheet("Global/Display.gif")
55
SpriteFrame(-16, -16, 32, 32, 1, 143) // #0 - "Script" Icon
56
57
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
58
end sub
59
60