Limit Specific Structure Placement to .. maybe 4?

Question above:

Its when i want a structure, Table, Box etc to check for same structure in range and prevent placement when there are to many (like 4 or more)

Is this possible with the Graph ? Iam new with the Graph so please be carful :smiley:

Yes. Quite easy really. On begin play do a get all actors of class (your actor), add a numerical check then destroy actor if it is more than specified amount

Something like this should work.

You may want to add some sort of self check on there or increase the amount by 1 because it WILL count the one you are in the process of placing
You probably also want to add a ā€œIsPreviewStructureā€ check after the switch has auth node since while in preview mode it will only count any actors within stasis range. It checks the entire server on begin play after final placement

Thank you,i will check on that. But this effects only the Tribe or Player ? Because i dont want that a tribe places 4 and nobody else can place this structure later :slight_smile:

Add a targeting team comparison then it will be 4 per tribe

hi, iā€™m doing something similar and iā€™ve got questions on what you setā€¦ why the switch authority ?
How does targetnig team worked, caus when i test it iā€™m not in traibe but it find a team so do i have to use something else like a cast to shooter player and get tribe to make the struct only buildable ince per tribe? Also will there not be an issue if players use fuse tribe?

Authority is called when something executes on the server. This is stuff that you need the server to do.

Targeting team is different from tribe id, thatā€™s why youā€™re getting one outside of a tribe.

The logic is only used when a player is placing the structure. If they place then merge, no checks will be made on how many the resulting tribe owns.

i put a ā€œis preview structureā€ test so i can have different calling of ā€œevent begin playā€ but all my casts fail due to get owner, owner controller,ā€¦ i test all that i can ^^ā€™ return none in both call of event

Iā€™ll try to play with the event on changing team to see if i can do something when the tribe merge

There technically is no owner when the item is in preview mode since it is not actually placed yet. Preview only fires on client so the server does not yet know who owns it.

You could be cheesy and start a looping event that executes like every 15 minutes or whatever to check how many the tribe owns.

Can someone post an example of this with the targeting team comparison? This is exactly what i need except i dont know where to add in the comparison. Thx.