File: chain_base.cfg

package info (click to toggle)
frogatto-data 1.2%2Bdfsg-1
  • links: PTS, VCS
  • area: non-free
  • in suites: wheezy
  • size: 201,844 kB
  • sloc: python: 302; xml: 223; perl: 139; sh: 48; makefile: 13; ruby: 4
file content (99 lines) | stat: -rw-r--r-- 2,555 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
90
91
92
93
94
95
96
97
98
99
[object_type]
activation_area="300"
id="chain_base"
on_child_spawned="[
	if(child.type = 'chain_base.spiked_ball', set(vars.ball, child),
	  set(child.activation_area, vars.ball.activation_area))
]"
on_create="[
spawn('chain_base.spiked_ball', x + 16, y + 16, 1, [set_var('radius', 210), set_var('speed', 5), set_var('parent', label)]),

map(range(20), 'radius', spawn('chain_base.chain_link', x + 16, y + 16, 1, [set_var('radius', (radius+1)*10), set_var('parent', label),
  if((radius%2) = 0, [animation('normal2'), set(z, z - 1)], set(z, z - 2))
]))]"
	[editor_info]
	category="machines"
	[/editor_info]

	[vars]
	ball="null()"
	[/vars]

	[animation]
	collide="0,0,16,16"
	duration="10000000"
	frame_info="0,0,1,1,871,523,16,16"
	id="normal"
	image="compiled-0.png"
	rect="871,523,887,539"
	[/animation]

	[object_type]
	id="spiked_ball"
	on_cosmic_shift="[add(vars.base_x, xshift), add(vars.base_y, yshift)]"
	on_process="[
		set(x, vars.base_x + (wave((wave(cycle*vars.speed)+1000)/4 + 250)*vars.radius)/1000),
		set(y, vars.base_y + (wave((wave(cycle*vars.speed)+1000)/4)*vars.radius)/1000),
		set(rotate, 90 + (((wave(cycle*vars.speed)+1000)/2)*180)/1000)]"
	on_spawned="[
	set(activation_area, [x - vars.radius, y, vars.radius*2 + img_w, vars.radius + img_h]),
	set_var('base_x', x), set_var('base_y', y)]"
		[properties]
		attack_damage="2"
		team="'evil'"
		[/properties]

		[animation]
		attack_area="all"
		collide="8,8,32,32"
		duration="10000000"
		id="normal"
		image="props/spikedball.png"
		rect="1,18,42,60"
		[/animation]

	[/object_type]

	[object_type]
	id="chain_link"
	on_spawned="[
	  set_var('base_x', x), set_var('base_y', y),
	  set(schedule_speed, 5),

	  set(x_schedule, transform(consts.x_schedule_base, x + (v*vars.radius)/1000)),
	  set(y_schedule,
	            transform(consts.y_schedule_base, y + (v*vars.radius)/1000)),
	  set(rotation_schedule, consts.rotation_schedule_base)
	  ]"
		[vars]
		radius="100"
		rotation_values="[]"
		x_values="[]"
		y_values="[]"
		[/vars]

		[consts]
		rotation_schedule_base="map(range(1000/25), 'c', 90 + (((wave(c*25)+1000)/2)*180)/1000)"
		speed="5"
		x_schedule_base="map(range(1000/25), 'c', wave((wave(c*25)+1000)/4 + 250))"
		y_schedule_base="map(range(1000/25), 'c', wave((wave(c*25)+1000)/4))"
		[/consts]

		[animation]
		duration="100000000"
		id="normal"
		image="props/spikedball.png"
		rect="5,7,14,17"
		[/animation]

		[animation]
		duration="100000000"
		id="normal2"
		image="props/spikedball.png"
		rect="14,7,23,17"
		[/animation]

	[/object_type]

[/object_type]