File: leaf_generator.cfg

package info (click to toggle)
frogatto-data 1.3.1%2Bdfsg-4
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 254,428 kB
  • sloc: xml: 584; python: 396; perl: 249; sh: 126; ruby: 69; makefile: 21
file content (106 lines) | stat: -rw-r--r-- 1,754 bytes parent folder | download | duplicates (3)
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
{
id: "leaf_generator",
zorder: 50,

ignore_collide: true,
hidden_in_game: true,

editor_info: {
	category: "controllers",
	var: [
		{
			name: "zone_x1",
			type: "x",
			value: "x",
		},
		{
			name: "zone_x2",
			type: "x",
			value: "x+224",
		},
		{
			name: "zone_y1",
			type: "y",
			value: "y",
		},
		{
			name: "zone_y2",
			type: "y",
			value: "y+224",
		},
	],
},

on_start_level: "
	set(activation_area, [
		vars.zone_x1 - 50,
		vars.zone_y1 - 100,
		vars.zone_x2 - vars.zone_x1 + 100,
		vars.zone_y2 - vars.zone_y1 + 100]
		)",

on_load: "add_particle_effect",

properties: {
	add_particle_effect: "[
		add_particles('leaves'),
		fire_event('setup_particles')]",
	},


on_setup_particles: "[
	   set(leaves.min_x, vars.zone_x1 - x),
	   set(leaves.max_x, vars.zone_x2 - x),
	   set(leaves.min_y, (vars.zone_y1) - y),
	   set(leaves.max_y, (vars.zone_y2) - y),
	   set(leaves.spawn_rate, ((zone_x2 - zone_x1)*(zone_y2 - zone_y1))/2000),
	   ]",

on_end_anim: "animation('normal')",


animation: {
	id: "normal",
	image: "effects/particles.png",
	x: 148,
	y: 73,
	w: 28,
	h: 28,
	frames: 1,
	duration: -1,
},

particle_system: [
	{
		pre_pump_cycles: 500,
		id: "leaves",
		type: "simple",
		spawn_rate: 100,
		//spawn_rate_random: 1000,
		time_to_live: 1040,
		min_x: -60,
		max_x: 60,
		min_y: -15,
		max_y: 15,
		velocity_y: 200,
		velocity_y_random: 600,
		velocity_x_schedule: "@eval map(range(0,1000,2), wave(value*1 + 1d4-2)/decimal(dist)) where dist = 1d400+300",
		accel_y: 1,

		animation: {
			loops: true,
			id: "normal",
			image: "effects/particles.png",
			x: 3,
			y: 79,
			w: 10,
			h: 10,
			pad: 3,
			frames: 6,
			reverse: true,
			duration: 5,
			palettes: "@include data/palettes.cfg:forest_palettes",
		},
	},
],
}