File: missile.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 (38 lines) | stat: -rw-r--r-- 1,186 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
[prototype]
always_active="yes"
has_feet="no"
id="missile"
object_level_collisions="yes"
on_collide="die()"
on_collide_level="die()"
on_collide_object_attack="[
	      if(collide_with.vars.team != vars.team and collide_with_area = 'body', die())]"
on_collide_object_body="if(collide_with.vars.team != vars.team and collide_with_area = 'attack', [get_hit_by(collide_with),die()])"
on_die="spawn('explosion', midpoint_x, midpoint_y, facing)"
solid_dimensions="enemy,player,common"
	[properties]
	get_hit_by="def(collide_with) if(not (me in collide_with.tmp.already_hit), [
				set(collide_with.tmp, 'already_hit', collide_with.tmp.already_hit + [me]),
				set(me.hitpoints, me.hitpoints - collide_with.vars.damage), if(me.hurt_velocity_y, set(me.velocity_y,me.hurt_velocity_y)), if(me.hurt_velocity_x, set(me.velocity_x,me.hurt_velocity_x * collide_with.facing))])"
	hurt_velocity_x="0"
	hurt_velocity_y="0"
	[/properties]

	[animation]
	attack_area="all"
	duration="10000"
	frame_info="1,6,1,6,302,739,17,7,3,6,1,6,319,739,15,7"
	frames="2"
	id="normal"
	image="compiled-0.png"
	rect="301,733,319,751"
	scale="2"
	[/animation]

	[vars]
	damage="1"
	team="'evil'"
	[/vars]

[/prototype]