Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R6/InvisibleBarrier.txt
1319 views
1
//------------Sonic CD R6 Barrier Script-------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
//-------Aliases-------//
6
#alias 68: TYPE_R6BARRIER
7
8
9
sub ObjectPlayerInteraction
10
if Player.Animation != ANI_LEDGEPULLUP
11
PlayerObjectCollision(C_TOUCH, -16, -14, 16, 16)
12
if CheckResult == 1
13
if Player.XPos < Object.XPos
14
Player.XPos = Player.CollisionLeft
15
Player.XPos <<= 16
16
Player.XPos += Object.XPos
17
Player.XPos -= 0x100000
18
else
19
Player.XPos = Player.CollisionRight
20
Player.XPos <<= 16
21
Player.XPos += Object.XPos
22
Player.XPos += 0x100000
23
end if
24
switch Object.PropertyValue
25
case 1
26
Player.YPos = Player.CollisionTop
27
Player.YPos <<= 16
28
Player.YPos += Object.YPos
29
Player.YPos -= 0x100000
30
break
31
case 2
32
Player.YPos = Player.CollisionBottom
33
Player.YPos <<= 16
34
Player.YPos += Object.YPos
35
Player.YPos += 0x300000
36
break
37
end switch
38
end if
39
end if
40
end sub
41
42
sub RSDKDraw
43
DrawSprite(0)
44
end sub
45
46
sub RSDKLoad
47
LoadSpriteSheet("Global/Display.gif")
48
SpriteFrame(-16, -16, 32, 32, 1, 143)
49
end sub
50
51