Hello guys!
I would like to know how much dinos a tribe currently have.
How could I do it without looping on ALL the dinos in the game?
Hello guys!
I would like to know how much dinos a tribe currently have.
How could I do it without looping on ALL the dinos in the game?
Found a function “GetAllNPCsOfTeam”, based on the TargetingTeam, with a “GetGameState->Cast to ShooterGameState”… but doesnt seems to work in the devkit test-environnement.
Will take a try on my server tomorrow.
I dont understand why “GetAllNPCsOfTeam->Length” returns 0… Any idea? Like if people didnt had any dino in their tribe… :s
Did someone already tried this function?
Print out targeting team as well, make sure that isn’t coming out as a 0.
No problem with the Targeting team, it works perfectly, like the other function getting all the players from the targeting tribe (not on the screen).
I did the stuff by looping on all the DinoCharacter. Thought it would do some lag but it doesnt.
Some arrays and counters did the job.
Wait until you have a server with 3,000 tames I had to create a GetAllLinkedStructure loop due to me not being able to find a native function for this. Now that caused some lag on the larger bases, noticeable stalls every time I looped. Fun times.
I loop only on demand.
And that’s to avoid tribes have too much dinos that I put a “limit by player” and a “limit by tribe”. I’m on a PvE with rules server.
This tool was to check if there is no cheaters about the dino limit
Do you plan on adding anything to deal with tribes that have quit? I have auto decay on my server, but not claimable dinos. The dinos of players who quit just sit there for months if nobody kills them. If I log in and delete them, I get blown up in chat