Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R6/InvisibleBlockNK.txt
1319 views
1
//-----------Sonic CD Invisible Block No Kill Script----------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
//-------Aliases-------//
6
7
// Collision
8
#alias 4 : C_BOX3
9
#alias 2 : PLAYER_COL_LWALL
10
#alias 3 : PLAYER_COL_RWALL
11
12
// Ink Effect Aliases
13
#alias 2 : INK_ALPHA
14
15
sub ObjectPlayerInteraction
16
#platform: Use_Standalone
17
PlayerObjectCollision(C_BOX, -16, -16, 16, 16)
18
#endplatform
19
20
#platform: Use_Origins
21
if Player.State != Player_State_LedgePullUp
22
if Player.Animation == ANI_CLIMBING
23
PlayerObjectCollision(C_BOX3, -16, -16, 16, 16)
24
else
25
PlayerObjectCollision(C_BOX, -16, -16, 16, 16)
26
if Player.Animation == ANI_GLIDING
27
switch CheckResult
28
case PLAYER_COL_LWALL
29
case PLAYER_COL_RWALL
30
PlayerObjectCollision(C_BOX3, -16, -16, 16, 16)
31
CallFunction(Player_ClimbBlock)
32
break
33
end switch
34
end if
35
end if
36
end if
37
#endplatform
38
end sub
39
40
41
// ========================
42
// Editor Subs
43
// ========================
44
45
sub RSDKDraw
46
TempValue0 = Object.XPos
47
TempValue0 -= 0x100000
48
TempValue1 = Object.YPos
49
TempValue1 -= 0x100000
50
51
DrawRectOutline(TempValue0, TempValue1, 0x20, 0x20, 0xFF, 0xFF, 0, 0xFF)
52
53
Object.InkEffect = INK_ALPHA
54
Object.Alpha = 1
55
DrawSpriteFX(0, FX_INK, Object.XPos, Object.YPos)
56
end sub
57
58
59
sub RSDKLoad
60
LoadSpriteSheet("Global/Display.gif")
61
SpriteFrame(-16, -16, 32, 32, 1, 143) // #0 - "Script" Icon
62
63
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
64
end sub
65