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
|
[object_type]
has_feet="no"
id="breakable_block"
on_collide_feet="[set(velocity_x, (velocity_x*70)/100), set(velocity_y, if(abs(velocity_y) > 50, -velocity_y/2, 0))]"
on_collide_head="set(velocity_y, -velocity_y)"
on_collide_object_body="if(collide_with_area = 'attack',
[if(animation != 'cracked', animation('cracked'), die()) ])"
on_collide_side="set(velocity_x, -(velocity_x*70)/100)"
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'])))
]"
solid_area="0,0,15,15"
zorder="-1"
[editor_info]
category="props"
[/editor_info]
[properties]
team="'neutral'"
[/properties]
[animation]
body_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]
[animation]
body_area="all"
duration="100"
frame_info="0,0,0,0,972,716,16,16"
frames="1"
id="cracked"
image="compiled-2.png"
rect="972,716,987,731"
[/animation]
[/object_type]
|