Help me: How to limit spawnable objects from widgets? Images below

Help: I want to limit spawning objects from my widget to only a set of numbers, not infinite, how can I achieve this? I have attached simple explanation of my case below




![3h|690x372](upload://iui8Wh9deDb0VvP2tJWVu8ML5Video of my Issue explained la.jpeg)

1 Like

You can just count the number of towers with ‘get actor of class’. If it’s too high, don’t let them spawn a new one…

Can you please provide me with a screenshot picture of the solution please?
Or maybe just tell me with Steps what I need to do with blueprints, thank you

Most simple way would be, right here

Do this instead

Thank you so much! it worked wonderfully

Umm if I may please

2 questions I have:

1- Do you know how can I make the widget of the tower appears to be blank or maybe bit faded low opacity so it can indicates it can’t be used anymore? how would I go by doing that?

2- How can I make the tower only be placed within a specific area on the map only, for example ( let’s say there’s a green highlighted area that is shining for the user, to put the tower ONLY THERE.

Thanks a bunch!

I think this tells you how to make a button look greyed out

As for not placing them in certain areas, more fiddly. Beyond the scope of this tutorial :rofl:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.