File: shot.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 (26 lines) | stat: -rw-r--r-- 1,008 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
[prototype]
	solid_dimensions=enemy,player,common

	#make it so when the object runs into solid parts of the level, a
	#on_collide_level event is fired so thee shot can be destroyed.
	object_level_collisions="true"
	#solid_area=0,0,10,10

	[properties]
	hurt_velocity_y=0
	hurt_velocity_x=0
	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))])"
	[/properties]

	has_feet=no
	on_collide="die()"
	on_collide_level="die()"
	on_collide_object_body="
		  if(collide_with.vars.team != vars.team and collide_with_area = 'attack', [get_hit_by(collide_with),die()])"
	on_collide_object_attack="[
	      if(collide_with.vars.team != vars.team and collide_with_area = 'body', die())]"
	
	
[/prototype]