Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-1-Sonic-2-2013-Script-Decompilation
Path: blob/master/Sonic 2/Scripts/Mission/MissionBlock.txt
1480 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: MissionBlock Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
// ========================
9
// Aliases
10
// ========================
11
12
// Player Aliases
13
private alias object.type : player.type
14
private alias object.state : player.state
15
16
// Reserved Object Slot Aliases
17
private alias 0 : SLOT_PLAYER1
18
private alias 1 : SLOT_PLAYER2
19
20
21
// ========================
22
// Events
23
// ========================
24
25
event ObjectUpdate
26
if player[SLOT_PLAYER1].state != Player_State_Drown
27
BoxCollisionTest(C_SOLID, object.entityPos, -16, -16, 16, 16, SLOT_PLAYER1, C_BOX, C_BOX, C_BOX, C_BOX)
28
29
if player[SLOT_PLAYER2].type != TypeName[Blank Object] // Shields are legally players, I guess
30
// If Tails is with Sonic (the only mission this would apply to is Bodyguard), check against them too
31
// No check if they're drowning or anything, just assume they're alive
32
BoxCollisionTest(C_SOLID, object.entityPos, -16, -16, 16, 16, SLOT_PLAYER2, C_BOX, C_BOX, C_BOX, C_BOX)
33
end if
34
end if
35
end event
36
37
38
event ObjectDraw
39
DrawSprite(0)
40
end event
41
42
43
event ObjectStartup
44
LoadSpriteSheet("Mission/Objects.gif")
45
SpriteFrame(-16, -16, 32, 32, 1, 18) // Mission Block Frame
46
end event
47
48
49
// ========================
50
// Editor Events
51
// ========================
52
53
event RSDKDraw
54
DrawSprite(0)
55
end event
56
57
58
event RSDKLoad
59
LoadSpriteSheet("Mission/Objects.gif")
60
SpriteFrame(-16, -16, 32, 32, 1, 18)
61
62
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
63
end event
64
65