Pixel-Composer/scripts/node_VFX_destroy/node_VFX_destroy.gml

12 lines
354 B
Text
Raw Normal View History

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