File: breakable_block.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 (43 lines) | stat: -rw-r--r-- 1,497 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
[object_type]
has_feet="no"
id="breakable_block"
on_collide="set(velocity_x, -(velocity_x*70)/100)"
on_collide_feet="[set(velocity_x, (velocity_x*70)/100), set(velocity_y, if(abs(velocity_y) > 50, -velocity_y/2, 0))]"
on_collide_head="set(velocity_y, -velocity_y)"
on_collide_object_body="if(collide_with_area = 'attack',
	if(not (me in collide_with.tmp.already_hit), [set(collide_with.tmp, 'already_hit', collide_with.tmp.already_hit + [me]), 
		
	if(animation != 'cracked', animation('cracked'), die())  ]))"
on_die="[score(level,5),sound('BlockBreak.ogg'), map([0] * 10, spawn('breakable_block_particle', x + 1d10, y + 1d10, facing))]"
on_enter_water="[
	add_wave(midpoint_x, y2, -2000, 5*velocity_y/2, 30*velocity_y, 300, 300),
	add_wave(midpoint_x, y2, 2000, 5*velocity_y/2, 30*velocity_y, 300, 300),
	add_wave(midpoint_x, y2, -1000, 3*velocity_y/2, 20*velocity_y, 200, 200),
	add_wave(midpoint_x, y2, 1000, 3*velocity_y/2, 20*velocity_y, 200, 200),
	add_wave(midpoint_x, y2, -500, 2*velocity_y/2, 10*velocity_y, 100, 100),
	add_wave(midpoint_x, y2, 500, 2*velocity_y/2, 10*velocity_y, 100, 100)
	]"
solid_area="0,0,15,15"
zorder="-1"
	[animation]
	body_area="all"
	duration="100"
	frame_info="0,0,0,0,935,400,16,16"
	frames="1"
	id="normal"
	image="compiled-0.png"
	rect="935,400,950,415"
	[/animation]

	[animation]
	body_area="all"
	duration="100"
	frame_info="0,0,0,0,951,400,16,16"
	frames="1"
	id="cracked"
	image="compiled-0.png"
	rect="951,400,966,415"
	[/animation]

[/object_type]