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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
[object_type]
id=big_gold_coin
on_create="add_particles('particles')"
collide_dimensions="~item"
on_collide_object_item="if(collide_with.player,fire_event('acquired'))"
on_end_anim="animation('normal')"
respawns="no"
[editor_info]
category=items
[/editor_info]
on_acquired="[set(level.player.driver.coins, level.player.driver.coins + 10),map([0,0,0,0,0,0,0,0],spawn('coin_sparkle',midpoint_x + 1d40-20,midpoint_y + 1d40-20,0)),sound('coin.ogg'),die()]"
#timer_frequency=30
#on_timer="spawn('coin_sparkle',midpoint_x + 1d60-30,midpoint_y + 1d60-30,0)"
[animation]
id=normal
image=props/items.png
rect=4,141,37,174
pad=3
frames=6
duration=6
item_area=all
[/animation]
[particle_system]
id=particles
type=simple
min_y=-10
max_y=60
min_x=-10
max_x=60
spawn_rate=60
time_to_live=20
[animation]
id=sparkle
image=props/items.png
rect=139,88,149,98
frames=4
pad=3
duration=6
[/animation]
[animation] ##same thing, but skip the first frame
id=sparkle
image=props/items.png
rect=153,88,163,98
frames=3
pad=3
duration=4
[/animation]
[animation] ##same thing, but skip the first 2 frames
id=sparkle
image=props/items.png
rect=167,88,177,98
frames=2
pad=3
duration=6
[/animation]
[/particle_system]
[/object_type]
|