So here is what I want to do. I want to create a script that allows me to collect a powerup that when I collect it it kills 2 or 3 enemies to start with I then want to be able to call it from a ui button to upgrade it using coins (I already have the coins being saved and managed and already upgrade menu that deducts coins). But I want to be able to have the ui button that is taking away coins increase the amount of tagged enemies that is killed per powerup I collide with. Is that doable? Or do I need to use some kind of kill radius script and can I call that to increase the radius with the ui button instead? Thanks for any help with this! Been searching all day for a way to do this correctly.
Ok, i suggest you to create a EnemyManager, where store in a list the enemy created in game, and in that script create a funcion who destroy a certain amount of enemy in the list.
For the rest you would do, i dont understand very well, but in any case you can call the “DestroyEnemy” funcion with UI Button if you set the funcion public.