Pixel-Composer/scripts/node_VFX_destroy/node_VFX_destroy.gml

12 lines
354 B
Text
Raw Normal View History

2023-02-28 15:43:01 +07:00
function Node_VFX_Destroy(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _group) constructor {
2022-12-13 15:20:36 +07:00
name = "Destroy";
2022-12-16 15:18:09 +07:00
node_draw_icon = s_node_vfx_destroy;
2022-12-13 15:20:36 +07:00
2024-08-08 11:57:51 +07:00
inputs[4].setVisible(false, false);
inputs[6].setVisible(false, false);
inputs[7].setVisible(false, false);
2023-01-17 14:11:55 +07:00
2022-12-13 15:20:36 +07:00
function onAffect(part, str) {
2024-12-25 10:52:25 +07:00
if(random(1) < str * strength) part.kill();
2022-12-13 15:20:36 +07:00
}
}