File: anthill.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 (46 lines) | stat: -rw-r--r-- 1,236 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
[object_type]
id="anthill"
on_child_spawned="[
	  remove_object(child),
	  set(attached_objects, [child]),
	  set(tmp.spawning, child)
	]"
on_end_normal_anim="[
	  set(vars.spawned_objects, filter(vars.spawned_objects, 'ant', ant.hitpoints > 0 and ant.x > context.vars.zone_x1 and ant.x2 < context.vars.zone_x2)),
	  animation('normal'),
	  if(size(vars.spawned_objects) < vars.max_objects,
	     set(vars.generation_counter, vars.generation_counter+1),
		 set(vars.generation_counter, 0)),
	  if(vars.generation_counter >= 5 and tmp.spawning,
	     [set(attached_objects, []), set(tmp.spawning, null()),
		  set(tmp.spawning.velocity_y, -400),
		  set(vars.spawned_objects, vars.spawned_objects + [tmp.spawning]),
		  add_object(tmp.spawning)]),
	  if(vars.generation_counter >= vars.generation_time,
	     [spawn('ant_red', midpoint_x, midpoint_y, facing),
		  set(vars.generation_counter, 0)])
	  ]"
	[vars]
	generation_counter="0"
	generation_time="20"
	max_objects="3"
	spawned_objects="[]"
	zone_x1="0"
	zone_x2="0"
	[/vars]

	[tmp]
	spawning="null()"
	[/tmp]

	[animation]
	duration="10"
	frame_info="0,20,3,1,692,458,36,12"
	frames="1"
	id="normal"
	image="compiled-2.png"
	rect="692,438,730,470"
	[/animation]

[/object_type]