Is this possible?

Im going with the thoughts of making some kind og animal trap.
Is it possible to make a script or something and link it to a object.

A script that attract specific animals depending on items/food in the trap and if the animal get to close to the trap it will removed the food and the animal and add a new item/animal to the trap as an item?

Ok have been playing around with Blueprints Visual Scripting now. And get some of it.
But can you make a globel BP that affect all objects in the game.
Like say. if i cut down a tree a new on spawn beside it? HOW?