Pixel-Composer/scripts/node_VFX_destroy/node_VFX_destroy.gml

15 lines
394 B
Plaintext
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
2023-01-17 08:11:55 +01:00
inputs[| 4].setVisible(false, false);
inputs[| 6].setVisible(false, false);
inputs[| 7].setVisible(false, false);
2022-12-13 09:20:36 +01:00
function onAffect(part, str) {
2023-10-10 07:12:42 +02:00
var _sten = getInputData(5);
2022-12-13 09:20:36 +01:00
if(random(1) < str * _sten)
part.kill();
}
}