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

« back to all changes in this revision

Viewing changes to data/objects/machines/milgram_block_launcher.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
 
 
2
        [object_type]
 
3
        id=milgram_block_launcher
 
4
        prototype=stationary_vulnerable
 
5
        hitpoints=10
 
6
        zorder=0
 
7
        
 
8
        [editor_info]
 
9
        category=machines
 
10
                [var]
 
11
                name=max_objects
 
12
                value="3"
 
13
                [/var]
 
14
                [var]
 
15
                name=loading_time
 
16
                value="1"
 
17
                [/var]
 
18
                [var]
 
19
                name=zone_x1
 
20
                type=x
 
21
                value="x - 300"
 
22
                [/var]
 
23
                [var]
 
24
                name=zone_x2
 
25
                type=x
 
26
                value="x + 400"
 
27
                [/var]
 
28
                [var]
 
29
                name=zone_y1
 
30
                type=y
 
31
                value="y - 400"
 
32
                [/var]
 
33
                [var]
 
34
                name=zone_y2
 
35
                type=y
 
36
                value="y + 500"
 
37
                [/var]
 
38
        [/editor_info]
 
39
 
 
40
        [vars]
 
41
                load=0
 
42
                team="'evil'"
 
43
                points_value="50"
 
44
                damage=1
 
45
                spawned_objects="[]"
 
46
                max_objects=3
 
47
        [/vars]
 
48
        
 
49
        [consts]
 
50
                armor=4
 
51
        [/consts]
 
52
        
 
53
        [properties]
 
54
                shouldfire="if(size(vars.spawned_objects) < vars.max_objects,1,0)"
 
55
        [/properties]
 
56
        
 
57
        on_create="add_particles('steam')"
 
58
        
 
59
        on_end_anim="[if(animation = 'normal',
 
60
                           if(vars.load >= vars.loading_time,
 
61
                                             [if(size(vars.spawned_objects) < vars.max_objects,animation('prepfire'),animation('normal')), set_var('load', 0)],
 
62
                                                 [animation('normal'), set_var('load', vars.load + 1)]),),
 
63
                                                 
 
64
                                        set(vars.spawned_objects, filter(vars.spawned_objects, 'ant', ant.hitpoints > 0 and ant.x > context.vars.zone_x1 and ant.x2 < context.vars.zone_x2 and ant.y >  context.vars.zone_y1 and ant.y2 < context.vars.zone_y2))]"
 
65
                                        
 
66
        on_child_spawned="if(child.type in ['milgram_pod'],set(vars.spawned_objects, vars.spawned_objects + [child]))"
 
67
                                        
 
68
        on_end_prepfire_anim="animation('fire')"
 
69
        on_end_fire_anim="animation('normal')"
 
70
                                              
 
71
        on_shoot="[spawn('milgram_pod', midpoint_x+ facing*50, midpoint_y -50, facing, [set(velocity_x,1000*facing),set(velocity_y,-1000),set(animation,'thrown'), set_var('damage', 0)]),sound('FlowerShot.ogg')]"
 
72
 
 
73
        
 
74
        on_die="spawn('explosion_big_recurring',  midpoint_x, midpoint_y, facing)"
 
75
        
 
76
        #on_puff="if(1d2=2,spawn('steam_particle',midpoint_x - 12*facing,y+14,1))"
 
77
 
 
78
        solid_area=10,20,38,50
 
79
 
 
80
                [base:animation]
 
81
                image=enemies/milgram-block-launcher.png
 
82
                pad=3
 
83
                accel_y=80
 
84
                body_area=all
 
85
                [/animation]
 
86
                
 
87
                [animation]
 
88
                id=normal
 
89
                rect=1,1,49,53
 
90
                frames=3
 
91
                reverse=yes
 
92
                duration=4
 
93
                events="12:puff"
 
94
                [/animation]
 
95
                
 
96
                #the spring animation is a duplicate of the normal animation,
 
97
                #unless/until we have a proper one.
 
98
                [animation]
 
99
                id=spring
 
100
                rect=1,1,49,53
 
101
                frames=3
 
102
                reverse=yes
 
103
                duration=4
 
104
                [/animation]
 
105
 
 
106
 
 
107
                [animation]
 
108
                id=prepfire
 
109
                rect=1,58,49,110
 
110
                frames=4
 
111
                duration=5
 
112
                [/animation]
 
113
 
 
114
 
 
115
                [animation]
 
116
                id=fire
 
117
                rect=1,115,49,167
 
118
                frames=4
 
119
                duration=5
 
120
                events="1:shoot"
 
121
                [/animation]
 
122
 
 
123
                [animation]
 
124
                id=hurt
 
125
                rect=1,58,49,110
 
126
                [/animation]
 
127
                
 
128
                
 
129
                [particle_system]
 
130
                id=steam
 
131
                type=simple
 
132
                spawn_rate=200
 
133
                time_to_live=75
 
134
                min_x=25
 
135
                max_x=30
 
136
                min_y=5
 
137
                max_y=15
 
138
                velocity_y=-200
 
139
                velocity_x=-200
 
140
                velocity_x_random=400
 
141
                velocity_y_random=400
 
142
                accel_y=-40
 
143
                #color=255,255,255,255
 
144
                delta_a=1
 
145
                [animation]
 
146
                        id=normal
 
147
                        image=effects/particles.png
 
148
                        x=3
 
149
                        y=67
 
150
                        w=9
 
151
                        h=9
 
152
                        pad=3
 
153
                        frames=5
 
154
                        duration=15
 
155
                        accel_y=-2
 
156
                        [/animation]
 
157
                [/particle_system]
 
158
 
 
159
        [/object_type]