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 74 75 76 77 78 79 80 81 82 83
|
[prototype]
has_feet="no"
id="falling_breakable_block"
object_level_collisions="true"
on_collide_level="die()"
on_collide_object_attack="[
if(collide_with.team != team and collide_with_area = 'body' and dies_when_hit, die())]"
on_collide_object_body="[
if(collide_with.team != team and collide_with_area = 'attack' and dies_when_hit, [get_hit_by(collide_with),die()]),
]"
on_collide_side="die()"
on_create="[if(vars.zone_x1 > vars.zone_x2, [set(vars.zone_x1, vars.zone_x2), set(vars.zone_x2, vars.zone_x1)]),
if(vars.zone_y1 > vars.zone_y2, [set(vars.zone_y1, vars.zone_y2), set(vars.zone_y2, vars.zone_y1)])]"
on_die="[spawn('breakable_block_chunk.particle_system_holder', x,y,facing),
sound('BlockBreak.ogg'),
map([0]*3d2, spawn('breakable_block_chunk',x+1d10, y+1d10, if(1d2=2,1,-1))),
map([0]*1d2, spawn('breakable_block_chunk',x+1d10, y+1d10, if(1d2=2,1,-1), add(variations, ['big'])))
]"
on_timer="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(accel_y, 60))"
solid_dimensions="enemy,player,common"
timer_frequency="2"
[properties]
attack_damage="1"
attack_knockback="0"
damage_cooldown="0"
dies_when_hit="1"
get_hit_by="def(collide_with) if(collide_with.damage_cooldown > cycle - vars.time_last_hit,
[add(me.hitpoints, - collide_with.attack_damage), set(vars.time_last_hit,cycle)])"
team="'evil'"
[/properties]
[vars]
damage="1"
zone_x1="0"
zone_x2="0"
zone_y1="0"
zone_y2="0"
[/vars]
[properties]
team="'evil'"
[/properties]
[editor_info]
category="props"
[var]
name="zone_x1"
type="x"
value="x-64"
[/var]
[var]
name="zone_x2"
type="x"
value="x+96"
[/var]
[var]
name="zone_y1"
type="y"
value="y"
[/var]
[var]
name="zone_y2"
type="y"
value="y+400"
[/var]
[/editor_info]
[animation]
attack_area="all"
duration="100"
frame_info="0,0,0,0,274,733,16,16"
frames="1"
id="normal"
image="compiled-2.png"
rect="274,733,289,748"
[/animation]
[/prototype]
|