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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
|
{
id: "whitewater_controller",
prototype: ["liquid"],
zorder: 40,
properties: {
add_water_effect: "add_water(zone_x1, zone_y1, zone_x2, zone_y2, [140,00,0,70])",
add_particle_effect: "[
add_particles('bubbles'),
add_particles('fizz'),
add_particles('splash'),
add_particles('splash_droplets'),
fire_event('setup_particles')]",
},
consts: {
damage: 128,
},
on_setup_particles: "[
set(bubbles.area, [zone_x1, zone_y1, zone_x2, zone_y2]),
set(fizz.min_x, vars.zone_x1 - x),
set(fizz.max_x, vars.zone_x2 - x),
set(fizz.min_y, (vars.zone_y1 - 15) - y),
set(fizz.max_y, (vars.zone_y1 + 60) - y),
set(fizz.spawn_rate, 4*(zone_x2 - zone_x1)),
set(splash.min_x, vars.zone_x1 - x),
set(splash.max_x, vars.zone_x2 - 54 - x),
set(splash.min_y, (vars.zone_y1 - 28) - y),
set(splash.max_y, (vars.zone_y1 - 28) - y),
set(splash.spawn_rate, 1*(zone_x2 - zone_x1)),
set(splash_droplets.pos_x, vars.zone_x1 - x),
set(splash_droplets.pos_x_rand, vars.zone_x2 - x),
set(splash_droplets.pos_y, (vars.zone_y1) - y),
set(splash_droplets.pos_y_rand, (vars.zone_y1) - y),
set(splash_droplets.generation_rate, 10*(zone_x2 - zone_x1))
]",
animation: {
id: "normal",
image: "effects/particles.png",
x: 147,
y: 102,
w: 28,
h: 28,
frames: 1,
duration: 1000,
},
particle_system: [
{
id: "bubbles",
type: "water",
number_of_particles: 100,
repeat_period: 200,
velocity_y: -1,
velocity_x: 0,
velocity_rand: 4,
dot_size: 2,
color: [120,250,200,200],
},
{
id: "fizz",
type: "simple",
spawn_rate: 600,
time_to_live: 48,
min_x: -60,
max_x: 260,
min_y: -5,
max_y: 15,
velocity_y: -200,
velocity_x: 260,
velocity_x_random: 200,
velocity_y_random: 400,
#color=255,255,255,255
animation: {
id: "normal",
image: "effects/water-splash.png",
x: 120, y: 1, w: 37, h: 37,
pad: 3,
frames: 12,
frames_per_row: 3,
duration: 4,
},
},
{
id: "splash",
type: "simple",
spawn_rate: 600,
time_to_live: 40,
min_x: -60,
max_x: 260,
min_y: 0,
max_y: 0,
velocity_y: 0,
velocity_x: 260,
#color=255,255,255,255
animation: {
id: "normal",
image: "effects/water-splash.png",
x: 1, y: 1, w: 54, h: 38,
pad: 3,
frames: 10,
frames_per_row: 2,
duration: 4,
},
},
{
id: "splash_droplets",
type: "point",
generation_rate_millis: 0,
time_to_live: 30,
red: 255,
green: 255,
blue: 255,
alpha: 255,
dot_size: 1,
pos_x: -10,
pos_x_rand: 20,
pos_y: -60,
velocity_x: -2000,
velocity_x_rand: 4000,
velocity_y: -4500,
velocity_y_rand: 2000,
accel_y: 200000,
},
],
}
|