~ubuntu-branches/ubuntu/utopic/frogatto-data/utopic

« back to all changes in this revision

Viewing changes to data/objects/items/heart_object.cfg

  • Committer: Bazaar Package Importer
  • Author(s): Dmitry E. Oboukhov
  • Date: 2010-07-16 12:14:11 UTC
  • Revision ID: james.westby@ubuntu.com-20100716121411-tobhfbyxrrz46dwz
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
        [object_type]
 
2
        id=heart_object
 
3
 
 
4
        [editor_info]
 
5
        category=items
 
6
        [/editor_info]
 
7
 
 
8
        [vars]
 
9
                time_to_live=5000
 
10
        [/vars]
 
11
 
 
12
        #hearts should not move when spawned, so if our parent gave us some
 
13
        #velocity, kill it here.
 
14
        #on_spawned="[set(velocity_x, 0), set(velocity_y, 0)]"
 
15
 
 
16
        on_die="map([0]*10, spawn('heart_sparkle_large', level.player.driver.midpoint_x, level.player.driver.y2, 0))"
 
17
 
 
18
        on_create="set(vars.time_to_live, level.cycle + vars.time_to_live)"
 
19
        on_collide_object_item="if(collide_with.player,if(level.player.driver.hitpoints < level.player.driver.max_hitpoints,
 
20
                [set(level.status_gui, 'objects', level.status_gui.objects + [object('heart_object', 20, 20, 1)]), die(), sound('HeartPickUp.ogg'), set(level.player.driver, 'hitpoints', level.player.driver.hitpoints + 1)]))"
 
21
        on_end_anim="animation('normal')"
 
22
        solid_dimensions=level_only
 
23
        friction=100
 
24
        
 
25
        #on_process="set(brightness,(wave(cycle*30)+1000)/3 + 255)"
 
26
 
 
27
        timer_frequency=10
 
28
        on_timer="[spawn('heart_sparkle',midpoint_x,midpoint_y,0),if(level.cycle > vars.time_to_live, remove_object(me))]"
 
29
 
 
30
        on_collide_feet="[set(velocity_y, -velocity_y), set(velocity_x, (velocity_x*9)/10 + (velocity_y*slope_standing_on)/270),animation('flash')]"
 
31
        on_collide="[set(velocity_y, velocity_y/2), set(velocity_x, -velocity_x),animation('flash')]"
 
32
 
 
33
 
 
34
                [animation]
 
35
                id=normal
 
36
                image=props/items.png
 
37
                rect=198,69,212,83
 
38
                pad=3
 
39
                frames=12
 
40
                frames_per_row=3
 
41
                duration=2
 
42
                item_area=all
 
43
                solid_area=4,4,8,8
 
44
                accel_y=30
 
45
                [/animation]
 
46
 
 
47
                [animation]
 
48
                id=flash
 
49
                image=props/items.png
 
50
                rect=180,105,194,119
 
51
                pad=3
 
52
                frames=1
 
53
                duration=4
 
54
                item_area=all
 
55
                solid_area=4,4,8,8
 
56
                accel_y=20
 
57
                [/animation]
 
58
        [/object_type]