4
if(child.type = 'wheel_big_wooden_shadow', set(child.zorder, parent.zorder-2)),
5
if(child.type = 'rope_platform', set(vars.platforms, vars.platforms + [child])),
6
if(child.type = 'vertical_rope',
7
[set(child.zorder, parent.zorder-1), set(vars.ropes, vars.ropes + [child])])]"
8
on_draw="map(vars.ropes, 'rope', rope.set_pos_len(rotate * if(index, -1, 1), vars.rope_len))"
10
#we set the positions of all our platforms in here. Icky math ahead!#
11
map(vars.platforms, 'platform',
13
#if the platform is going vertically up the left side#
14
if(cycle_pos > 180 and cycle_pos < 180 + context.vars.rope_len/PLATFORM_SPEED,
15
[set(platform.midpoint_x, context.midpoint_x - PLATFORM_X_DISTANCE),
16
set(platform.midpoint_y, PLATFORM_Y_ADJUST + context.midpoint_y - (cycle_pos - 180)*PLATFORM_SPEED)],
18
#if the platform is going vertically down the right side#
19
if(cycle_pos > 360 + context.vars.rope_len/PLATFORM_SPEED,
20
[set(platform.midpoint_x, context.midpoint_x + PLATFORM_X_DISTANCE),
21
set(platform.midpoint_y, PLATFORM_Y_ADJUST + context.vars.other_wheel_position + (cycle_pos - (360 + context.vars.rope_len/PLATFORM_SPEED))*PLATFORM_SPEED)],
23
#if the platform is curving around the platform. This is basically
24
a circle once you subtract the time spent on the edges#
25
[set(platform.midpoint_x, context.midpoint_x + (wave((if(cycle_pos <= 180, cycle_pos, cycle_pos - context.vars.rope_len/PLATFORM_SPEED)*1000)/360 + 250)*PLATFORM_X_DISTANCE)/1000),
26
set(platform.midpoint_y, PLATFORM_Y_ADJUST + context.midpoint_y + (wave((if(cycle_pos <= 180, cycle_pos, cycle_pos - context.vars.rope_len/PLATFORM_SPEED)*1000)/360)*PLATFORM_X_DISTANCE)/1000 - if(cycle_pos > 180, context.vars.rope_len, 0))]
29
#a variable representing where this platform is in its repeating cycle#
30
where cycle_pos = (cycle + (index*context.vars.cycle_period)/size(vars.platforms))%context.vars.cycle_period
33
set(rotate, rotate + 1)]"
35
set(vars.cycle_period, 360 + (abs(midpoint_y - vars.other_wheel_position)*2)/PLATFORM_SPEED),
36
if(vars.other_wheel_position != null(),
37
[set(activation_area, [x - 30, min(midpoint_y, vars.other_wheel_position) - img_w, img_w + 60, abs(midpoint_y - vars.other_wheel_position) + img_h*2]),
38
spawn('wheel_big_wooden', midpoint_x, vars.other_wheel_position, facing),
39
spawn('vertical_rope', x+10, min(midpoint_y, vars.other_wheel_position), facing),
40
spawn('vertical_rope', x+img_w-10, min(midpoint_y, vars.other_wheel_position), facing),
41
map([0] * vars.nplatforms, spawn('rope_platform', x, y, facing))
43
spawn('wheel_big_wooden_shadow',midpoint_x-10, midpoint_y-4,facing, [set('zorder', zorder-2)]),
44
set(vars.rope_len, abs(midpoint_y - vars.other_wheel_position))
49
PLATFORM_X_DISTANCE="72"
50
PLATFORM_Y_ADJUST="30"
56
other_wheel_position="null()"
63
left_rope="vars.ropes[0]"
64
right_rope="vars.ropes[1]"
68
frame_info="1,1,1,0,570,648,78,79"
70
image="compiled-0.png"
71
rect="569,647,648,726"