Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R6/HangingTrigger.txt
1319 views
1
//--------------Sonic CD Hanging Trigger Script---------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
// Aliases
6
7
// Stage SFX
8
#alias 2 : SFX_S_CATCH
9
10
11
sub ObjectPlayerInteraction
12
PlayerObjectCollision(C_TOUCH, -8, -2, 8, 20)
13
if Player.YVelocity > -1
14
if Player.XPos > Object.XPos
15
if CheckResult == true
16
if Player.Animation != ANI_HANGING
17
Player.State = Player_State_HangBar
18
19
Player.YVelocity = 0
20
21
Player.Animation = ANI_HANGING
22
23
Player.YPos = Player.CollisionTop
24
Player.YPos *= -0x10000
25
Player.YPos += Object.YPos
26
27
PlayStageSfx(SFX_S_CATCH, false)
28
29
Screen.AdjustCameraY = 0
30
end if
31
end if
32
end if
33
end if
34
end sub
35
36
37
// ========================
38
// Editor Subs
39
// ========================
40
41
sub RSDKDraw
42
Object.InkEffect = 1
43
DrawSpriteFX(0, FX_INK, Object.XPos, Object.YPos)
44
end sub
45
46
47
sub RSDKLoad
48
LoadSpriteSheet("Players/Sonic3.gif")
49
SpriteFrame(0, 0, 32, 48, 1, 132) // #0 - Hanging Sonic
50
51
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
52
end sub
53
54