1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
{
id: "crazy_platform",
platform_area: [0,0,80,1],
properties: {
tilt_angle: "if(target_angle < -20, -20, if(target_angle > 20, 20, target_angle)) where target_angle = level.player.ctrl_tilt/10",
},
on_process: "[
add(velocity_x, angle),
set(platform_area, [80 - 80*cos(angle), 17, 160*cos(angle), 1]),
plot_x(x + (80 - 80*cos(angle))*2),
plot_x(x + ((80 - 80*cos(angle)) + 160*cos(angle))*2),
set(rotate, angle),
set(platform_offsets, [-160*sin(angle), 160*sin(angle)])
] where angle = tilt_angle",
animation: {
id: "normal",
no_remove_alpha_borders: true,
image: "experimental/crazy-platform.png",
x: 0,
y: 0,
w: 160,
h: 32,
duration: 10000,
},
}
|