File: partial_max_heart_object.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,714 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]
	id=partial_max_heart_object

	[editor_info]
	category=items
	[/editor_info]

	on_collide_object_body="if(collide_with.player,fire_event('acquired'))"
	
	on_acquired="[
		music_onetime('specialitem.ogg'),
		spawn('color_flash',x,y,0,[set(color_r,237),set('color_g',28),set('color_b',36)]),
		map([0,0,0,0,0,0,0,0,0,0],spawn('heart_sparkle',midpoint_x,midpoint_y,0)),schedule(1,die()),
		switch(level.player.num_partial_hearts,
			0,
				[set(level.player.driver.num_partial_hearts, level.player.driver.num_partial_hearts + 1), speech_dialog([~You've found part of a heart capsule.~,~Collect another three to increase~,~ your maximum HP by one!~])],
			1,
				[set(level.player.driver.num_partial_hearts, level.player.driver.num_partial_hearts + 1), speech_dialog([~You've found part of a heart capsule.~,~Collect another two to increase~,~ your maximum HP by one!~])],
			2,
				[set(level.player.driver.num_partial_hearts, level.player.driver.num_partial_hearts + 1), speech_dialog([~You've found part of a heart capsule.~,~Collect another one to increase~,~ your maximum HP by one!~])],
			3,
				[set(level.player.driver.num_partial_hearts, 0),
				set(level.player.driver.max_hitpoints, level.player.driver.max_hitpoints + 1), set(level.player.driver, 'hitpoints', level.player.driver.hitpoints + 1), 
				speech_dialog([~You've collected enough parts to~,~make a whole new heart capsule!~,~Your maximum HP has increased by one!~])])]"
	
	on_end_normal_anim="animation('normal')"
	on_end_touched_anim="die()"
	respawns=no

		[animation]
		id=normal
		image=props/items.png
		body_area=all
		x=44
		y=1
		w=40
		h=23
		frames=1
		pad=3
		duration=100
		reverse=yes
		[/animation]
	[/object_type]