5
id="ant_flying_platform_red"
7
on_add_object_fail="[if(collide_with.vars.team != vars.team and collide_with.get_hit_by, collide_with.get_hit_by(me)), die()]"
9
on_change_animation_failure="[die()]"
10
on_change_solid_dimensions_fail="if(tmp.in_change_dimensions_fail or (not collide_with), die(),
11
[set(tmp.in_change_dimensions_fail, 1),
12
fire_event(collide_with, 'blocking_thrown_object'),
13
set(solid_dimensions_in, consts.solid_dimensions),
14
set(tmp.in_change_dimensions_fail, 0)
16
on_collide="[if(animation in ['fly','turnFly'],
18
if(velocity_x*facing > 0, [animation('turnFly'), set(facing, -facing)],
21
on_collide_feet="if(animation in ['fly','turnFly'], animation('fly'),animation('stand'))"
23
on_collide_object_body="if(collide_with.vars.team != vars.team and collide_with_area = 'attack', get_hit_by(collide_with, 'hurtLoseWings'))"
24
on_collide_object_thrown="[if(collide_with_area = 'body' and collide_with.vars.team != vars.team and vars.damage > 0,
25
[if(collide_with.get_hit_by, [collide_with.get_hit_by(me)]), die()])]"
26
on_create="[animation('fly'),set('traction_in_air',0)]"
27
on_die="[score(level,points_value), spawn_item(self), spawn('die_cloud', midpoint_x, midpoint_y, facing)]"
28
on_end_anim="if(animation in ['fly','turnFly'], animation('fly'),animation('stand'))"
29
on_end_hurt_anim="animation('walk')"
30
on_end_turn_anim="animation('walk')"
31
on_enter_anim="set(tmp.already_hit, [])"
32
on_enter_stand_anim="[null(), fire_event('lose_wings'), set(type, consts.walking_type)]"
33
on_enter_thrown_anim="[[if((not tmp.cycle_thrown_anim), set(vars.damage, consts.thrown_damage), set(tmp.cycle_thrown_anim, 0))], fire_event('lose_wings'), set(type, consts.walking_type)]"
34
on_enter_walk_anim="[if(not is_standing, animation('stand')), fire_event('lose_wings'), set(type, consts.walking_type)]"
35
on_enter_water="die()"
36
on_hurtflicker="if(green = 100,[set(green, 255), set(blue, 255)],[set(green, 100), set(blue, 100)])"
37
on_jumped_on="[if(jumped_on_by.mass >= 20, die())]"
38
on_leave_hurtLoseWings_anim="[set(green, 255), set(blue, 255), fire_event('lose_wings'), set(type, consts.walking_type)]"
39
on_leave_hurt_anim="[set(green, 255), set(blue, 255)]"
40
on_leave_on_back_anim="set(brightness, 256)"
41
on_leave_thrown_anim="[set(solid_dimensions_in, consts.solid_dimensions), set(vars.team, 'evil'), set(vars.damage, consts.normal_damage)]"
42
on_process_fly="[if(abs(y - vars.desired_height) > 10, set(velocity_y, (600*if(vars.desired_height < y, -1, 1))), set(velocity_y, 0)),
44
if(solid(level, front + facing*50, y, 1, y2 - y) or (facing < 0 and x < vars.x_bound) or (facing > 0 and x2 > vars.x2_bound),
45
[facing(-facing), animation('turnFly')])]"
46
on_process_on_back="if(tmp.on_back_count > 8, [if(tmp.on_back_count > 10 and time_in_animation > 7, set(velocity_y, velocity_y-300)), set(brightness, if(cycle%6 > 2, 256, 512))])"
47
on_process_stand="if(is_standing, animation('walk'))"
48
on_stomped_on="[add(hitpoints, -3), set(green, 0), set(blue, 0),
49
schedule(4, [set(green, 255), set(blue, 255)])]"
50
on_surface_damage="die()"
51
on_timer="if(not (animation in ['thrown', 'on_back']), [set(rotate, slope_standing_on), if(turns_at_cliffs and is_standing and animation = 'walk' and distance_to_cliff < DISTANCE_TO_CLIFF_CHECK,[set(facing, -facing),animation('turn')],null())])"
52
solid_area="2,7,23,25"
53
solid_dimensions="enemy,common"
57
traction_in_air="1000"
59
get_hit_by="def(collide_with) execute(me,
60
if(not (me in collide_with.tmp.already_hit), [
61
set(collide_with.tmp, 'already_hit', collide_with.tmp.already_hit + [me]),
62
if((not is_invincible_posthit) and (collide_with.vars.damage > 0),
63
if(collide_with.vars.damage > consts.armor,
65
if(me.hitpoints > collide_with.vars.damage,
67
if(collide_with.vars.damage <= consts.flinch_threshold,
68
schedule(4, [set(me.green, 255), set(me.blue, 255)]),
69
set(me.animation, 'hurt')),
70
set(me.green, 100), set(me.blue, 100)
72
set(me.hitpoints, me.hitpoints - collide_with.vars.damage),
73
set(tmp.time_last_hit, me.cycle)
75
if(collide_with.vars.damage > consts.flinch_threshold and me.hurt_velocity_y and (not collide_with.tmp.no_flinch_attack), set(me.velocity_y,(me.hurt_velocity_y))),
76
if(collide_with.vars.damage > consts.flinch_threshold and me.hurt_velocity_x and (not collide_with.tmp.no_flinch_attack), set(me.velocity_x, ((me.hurt_velocity_x * collide_with.facing + collide_with.velocity_x/2)*collide_with.mass*if(collide_with.attack_force, collide_with.attack_force, 100))/(me.mass*100)))]))"
78
hurt_velocity_y="-800"
79
is_invincible_posthit="if(tmp.time_last_hit and (abs(tmp.time_last_hit - me.cycle) < consts.posthit_invicibility_period), 1, 0)"
97
DISTANCE_TO_CLIFF_CHECK="30"
100
solid_dimensions="['enemy', 'common']"
104
walking_type="'ant_platform_red'"
113
frame_info="1,7,1,3,651,746,23,18,1,7,1,3,674,746,23,18,1,7,1,3,697,746,23,18,3,7,1,1,720,746,21,20"
116
image="compiled-0.png"
117
rect="650,739,674,766"
119
rotate_on_slope="yes"
127
frame_info="1,7,1,3,561,746,23,18,1,7,1,3,584,746,23,18,1,7,1,3,607,746,23,18,3,7,1,1,630,746,21,20"
130
image="compiled-0.png"
131
rect="560,739,584,766"
133
rotate_on_slope="yes"
141
frame_info="0,7,3,3,638,389,22,18,3,7,3,3,660,389,19,18"
145
image="compiled-2.png"
146
rect="638,382,662,409"
147
rotate_on_slope="yes"
155
events="6:12:18:hurtflicker"
156
frame_info="6,6,2,2,842,746,17,20,0,6,2,2,859,746,23,20,0,6,2,2,882,746,23,20"
159
image="compiled-0.png"
160
rect="836,740,860,767"
161
rotate_on_slope="yes"
167
attack_area="15,18,26,26"
170
frame_info="5,7,2,2,572,369,18,19"
173
image="compiled-2.png"
174
rect="567,362,591,389"
175
rotate_on_slope="yes"
183
frame_info="4,9,3,1,740,389,18,18"
186
image="compiled-2.png"
187
rect="736,380,760,407"
188
rotate_on_slope="yes"
189
thrown_area="0,0,31,36"
197
frame_info="4,9,3,1,740,389,18,18"
200
image="compiled-2.png"
201
rect="736,380,760,407"
202
rotate_on_slope="yes"
208
attack_area="15,18,26,26"
211
frame_info="5,7,2,2,590,369,18,19,5,8,2,2,608,369,18,18,5,7,2,2,626,369,18,19"
214
image="compiled-2.png"
215
rect="585,362,609,389"
216
rotate_on_slope="yes"
222
attack_area="15,18,26,26"
226
frame_info="5,7,2,2,665,369,18,19,5,8,2,2,683,369,18,18,5,7,2,2,701,369,18,19"
229
image="compiled-2.png"
230
rect="660,362,684,389"
231
rotate_on_slope="yes"
239
frame_info="4,9,2,2,399,425,19,17"
242
image="compiled-2.png"
243
rect="395,416,419,443"
244
rotate_on_slope="yes"
250
attack_area="0,18,26,26"
253
frame_info="4,8,5,2,758,389,16,18,4,8,4,2,774,389,17,18,5,8,4,2,791,389,16,18"
256
image="compiled-2.png"
257
rect="754,381,778,408"
258
rotate_on_slope="yes"
266
events="6:12:18:hurtflicker"
267
frame_info="5,7,3,1,1007,129,17,20"
270
image="compiled-1.png"
271
rect="1002,122,1026,149"
272
rotate_on_slope="yes"