4
on_become_active="if(vars.bat, if(vars.bat.hitpoints <= 0, die(), fire_event(vars.bat, 'restore')))"
5
on_create="[set(alpha, 0), spawn('bat.instance', midpoint_x, midpoint_y, facing)]"
8
set(child.vars.zone_x1, vars.zone_x1),
9
set(child.vars.zone_x2, vars.zone_x2),
10
set(child.vars.zone_y1, vars.zone_y1),
11
set(child.vars.zone_y2, vars.zone_y2),
48
image="enemies/bat.png"
62
on_enter_thrown_anim="[set(vars.damage, consts.thrown_damage)]"
63
on_leave_thrown_anim="[set(vars.damage, consts.normal_damage)]"
66
on_restore="if(animation = 'thrown', set(hitpoints, 0), [if(vars.flying and (not active), [set(vars.flying, 0), animation('hang'), set(x, vars.start_x), set(y, vars.start_y)])])"
68
on_create="[set(vars.start_x, x), set(vars.start_y, y)]"
69
on_end_hang_anim="if(level.player.midpoint_x > vars.zone_x1 and level.player.midpoint_x < vars.zone_x2 and level.player.midpoint_y > vars.zone_y1 and level.player.midpoint_y < vars.zone_y2, [set(animation, 'alert'), set(vars.flying, 1)], set(animation, 'hang'))"
70
on_end_alert_anim="[set(velocity_y, 200), set(accel_y, -2), animation('fly')]"
71
on_end_fly_anim="animation('fly')"
72
on_end_hurt_anim="[set(velocity_y, 200), set(accel_y, -2), animation('fly')]"
73
on_die="[score(level, 10), spawn_item(self), spawn('die_cloud', midpoint_x, midpoint_y, facing)]"
75
on_collide_object_thrown="
76
[if(collide_with_area = 'body' and collide_with.vars.team != vars.team,
77
[if(collide_with.get_hit_by, [collide_with.get_hit_by(me)]), die()])]"
103
image="enemies/bat.png"
117
image="enemies/bat.png"
127
image="enemies/bat.png"
140
image="enemies/bat.png"
150
image="enemies/bat.png"