File: moth.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 (131 lines) | stat: -rw-r--r-- 1,989 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
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
131
	
	[object_type]
	id=moth
	prototype=ant
	traction_in_air=1000
	friction=1000
	traction=1000

	[vars]
		points_value=5
		turns_at_cliffs=1
	[/vars]

	[editor_info]
	category=bugs
		[var]
		name=x_bound
		type=x
		value="x - 200"
		[/var]
		[var]
		name=x2_bound
		type=x
		value="x2 + 200"
		[/var]
		[var]
		name=desired_height
		type=y
		value="y - 200"
		[/var]
	[/editor_info]

	on_process_fly="[if(abs(y - vars.desired_height) > 10, set(velocity_y, (600*if(vars.desired_height < y, -1, 1))), set(velocity_y, 0)),
	
	if(solid(level, front + facing*50, y, 1, y2 - y) or (facing < 0 and x < vars.x_bound) or (facing > 0 and x2 > vars.x2_bound),
	[facing(-facing), animation('turn')])]"
	
	on_end_anim="if(animation in ['fly','turnFly'], animation('fly'), %PROTO%)"

	on_end_turn_anim="if(1d2=2,animation('fly'),animation('walk'))"

		[base:animation]
		image=enemies/moth.png
		rotate_on_slope=yes
		pad=3
		accel_x=0
		accel_y=80
		body_area=all
		[/animation]

	
		[animation]
		id=stand
		rect=3,1,27,28
		frames=1
		duration=6
		[/animation]
	
		[animation]
		id=thrown
		thrown_area=all
		body_area=none
		rect=31,33,55,60
		frames=2
		[/animation]

		[animation]
		id=on_back
		rect=31,33,55,60
		frames=2
		[/animation]

		[animation]
		id=walk   #blink variant
		accel_x=250
		rect=89,1,113,28
		frames=3
		duration=6
		[/animation]

		[animation]
		id=walk
		duplicates=6
		accel_x=250
		rect=3,1,27,28
		frames=3
		duration=6
		[/animation]

		[animation]
		id=spring
		rect=59,189,83,216
		frames=2
		duration=4
		[/animation]

		[animation]
		id=turn
		rect=3,65,27,92
		frames=3
		duration=4
		[/animation]

		[animation]
		id=hurt
		rect=90,65,114,92
		frames=1
		duration=18
		events="6:12:18:hurtflicker"
		[/animation]
		
		
		[animation]
		id=fly
		rect=3,96,27,123
		frames=4
		reverse=yes
		duration=6
		accel_y=0
		accel_x=10
		[/animation]
		
		[animation]
		id=turnFly
		rect=3,127,27,154
		frames=2
		frames_per_row=1
		duration=4
		[/animation]
	[/object_type]