File: key.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 (41 lines) | stat: -rw-r--r-- 1,163 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
[object_prototype]
	prototype=hittable

	solid_dimensions=thrown
	collide_dimensions="~key"
	friction=1000

		[editor_info]
		category=keys
		[/editor_info]

		[vars]
		damage=1
		[/vars]

	tags=swallowable

		[properties]
		get_hit_by="def(collide_with)  null()"
		[/properties]

	on_collide_object_body=" if(collide_with_area = 'attack', get_hit_by(collide_with))"


	on_collide="set(velocity_x, -(velocity_x*70)/100)"
	on_collide_head="set(velocity_y, -velocity_y)"
	on_collide_feet="[set(velocity_x, (velocity_x*50)/100), if(abs(velocity_x) < 50, set(velocity_x, 0)), set(velocity_y, if(abs(velocity_y) > 50, -velocity_y/2, 0))]"

	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)
	]"

	zorder=-1
	solid_area=0,0,15,15

[/object_prototype]