Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R8/InvisibleBarrier.txt
1319 views
1
//------------Sonic CD Invisible Barrier Script---------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
6
sub ObjectPlayerInteraction
7
#platform: Use_Origins
8
if Player.Animation != ANI_LEDGEPULLUP
9
#endplatform
10
PlayerObjectCollision(C_TOUCH, -16, -14, 16, 16)
11
if CheckResult == true
12
if Player.XPos < Object.XPos
13
Player.XPos = Player.CollisionLeft
14
Player.XPos <<= 16
15
Player.XPos += Object.XPos
16
Player.XPos -= 0x100000
17
else
18
Player.XPos = Player.CollisionRight
19
Player.XPos <<= 16
20
Player.XPos += Object.XPos
21
Player.XPos += 0x100000
22
end if
23
end if
24
#platform: Use_Origins
25
end if
26
#endplatform
27
end sub
28
29
30
// ========================
31
// Editor Subs
32
// ========================
33
34
sub RSDKDraw
35
TempValue0 = Object.XPos
36
TempValue0 -= 0x100000
37
TempValue1 = Object.YPos
38
TempValue1 -= 0xE0000
39
DrawRectOutline(TempValue0,TempValue1,0x20,0x1C,255,255,0,255)
40
Object.InkEffect = 2
41
Object.Alpha = 1
42
DrawSpriteFX(0, FX_INK, Object.XPos, Object.YPos)
43
end sub
44
45
46
sub RSDKLoad
47
LoadSpriteSheet("Global/Display.gif")
48
SpriteFrame(-16, -14, 32, 28, 1, 143) // #0 - "Script" Icon
49
50
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
51
end sub
52
53