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/PullUpWater.txt
1480 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: PullUpWater Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
// ========================
9
// Events
10
// ========================
11
12
event ObjectUpdate
13
foreach (TypeName[Water], arrayPos0, ALL_ENTITIES)
14
object[arrayPos0].state = 1
15
object[arrayPos0].ypos = stage.newWaterLevel
16
next
17
18
object.type = TypeName[Blank Object]
19
end event
20
21
22
event ObjectStartup
23
foreach (TypeName[PullUpWater], arrayPos0, ALL_ENTITIES)
24
object[arrayPos0].priority = PRIORITY_ACTIVE
25
next
26
end event
27
28
29
// ========================
30
// Editor Events
31
// ========================
32
33
event RSDKDraw
34
object.inkEffect = INK_BLEND
35
36
//GetObjectType(temp2, "Water")
37
// wanna draw a line from the water y pos, but there's no good way to find where that is :(
38
// TODO: do
39
40
temp0 = object.xpos
41
temp1 = 700
42
temp1 += object.ypos
43
while temp0 < temp1
44
DrawSpriteFX(0, FX_INK, temp0, object.ypos)
45
temp0 += 0x1000000
46
loop
47
end event
48
49
50
event RSDKLoad
51
LoadSpriteSheet("CPZ/Objects2.gif")
52
SpriteFrame(0, -8, 256, 16, 0, 0)
53
54
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
55
end event
56
57