File: current_generator.cfg

package info (click to toggle)
frogatto-data 1.0-2
  • links: PTS, VCS
  • area: non-free
  • in suites: squeeze
  • size: 155,116 kB
  • sloc: makefile: 1
file content (89 lines) | stat: -rw-r--r-- 1,591 bytes parent folder | download
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
	[object_type]
	id=current_generator
	ignore_collide=true
	
	[editor_info]
	category=controllers
		[var]
		name=zone_x1
		type=x
		value="x"
		[/var]
		[var]
		name=zone_x2
		type=x
		value="x+200"
		[/var]
		[var]
		name=zone_y1
		type=y
		value="y"
		[/var]
		[var]
		name=zone_y2
		type=y
		value="y+200"
		[/var]
		[var]
		name=strength
		value="1000"
		[/var]
		[var]
		name=current_vel_x
		value="0"
		[/var]
		[var]
		name=current_vel_y
		value="-200"
		[/var]
	[/editor_info]

	#hack to make it invisible in game, but visible in editor.
	on_create="[set(alpha,0),
		set(current_generator, rect_current(zone_x1, zone_y1 ,abs(zone_x1 - zone_x2) ,abs(zone_y1 - zone_y2) , current_vel_x, current_vel_y, strength)),
		add_particles('particles'),
		fire_event('setup_particles')]"
	
	on_setup_particles="[
		set(particles.velocity_x, current_vel_x*10),
		set(particles.velocity_y, current_vel_y*10),
		set(particles.min_x, min(zone_x1, zone_x2) - x),
		set(particles.max_x, max(zone_x1, zone_x2) - x),
		set(particles.min_y, min(zone_y1, zone_y2) - y),
		set(particles.max_y, max(zone_y1, zone_y2) - y)
		]"
	
	on_end_anim="animation('normal')"
	zorder=50
		[animation]
		id=normal
		image=effects/particles.png
		x=86
		y=11
		w=28
		h=28
		frames=1
		duration=1000
		[/animation]

		[particle_system]
			id=particles
			type=simple
			spawn_rate=3000
			time_to_live=50

				[animation]
				id=sparkle
				image=effects/particles.png
				x=86
				y=3
				w=4
				h=4
				pad=3
				frames=5
				duration=10
				accel_y=-1
				scale=2
				[/animation]
		[/particle_system]
	[/object_type]