# Reading all structures in radius

**URL:** <https://forums.unrealengine.com/t/reading-all-structures-in-radius/67532>\
**Category:** ARK: Survival Evolved\
**Tags:** unreal-engine, Ark:-Survival-Evolved\
**Created:** [June 26, 2016, 10:36pm UTC](https://forums.unrealengine.com/t/reading-all-structures-in-radius/67532 "2016-06-26T22:36:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [June 26, 2016, 10:36pm UTC](https://forums.unrealengine.com/t/reading-all-structures-in-radius/67532/1 "2016-06-26T22:36:20Z")

</div>

Hello,

What’s the best way to gather info of all structures in a radius? Offline Raid Protection has a really cool feature where it shows you how many structures it’s protecting. How do you go about;

1. Setting the radius
2. Looping through _all_ structures
3. “Read” the structure - HP, name, time left until demolish allowed, all aspects of it

I’m still new to this modding things, so I’m trying to learn what this dev kit has to offer

Edit: It looks like while looping through the structures, I can cast to primalstructure and return as primalstructure some variables. Is this how it’s done?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6784655f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6784655f](https://forums.unrealengine.com/u/anonymous_user_6784655f)\
**Post date:** [June 30, 2016, 11:33pm UTC](https://forums.unrealengine.com/t/reading-all-structures-in-radius/67532/2 "2016-06-30T23:33:35Z")

</div>

box overlaps actors or sphere it will return an array then send the array through a for each loop then you need to cast it to the structure or parent you want and you can refine it more through casting  
example this is how i go about refineing a crop plot to auto put fertalizer in it i need the break there to prevent a dupe bug

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/9/5/f95daeb4381cf0a59499d398f867fbb17a8898b2.png)  
this one is poop collection  
the max inventory limit function is tells me when a certian inventory is full  
and the pooptype goes through a casting cycle to determin what poop to add to the inventory  
 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/4/7/d477466bf9794a006ae65510ce1fd54ea2e4d094.png)  
the way i see what type of poop it is  
 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/d/4/4d4fa8fdd92e0816c2839b907ff1b257c0c33d35.png)

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [July 1, 2016, 10:08pm UTC](https://forums.unrealengine.com/t/reading-all-structures-in-radius/67532/3 "2016-07-01T22:08:17Z")

</div>

> [@Raptor\_Chick;557367](#):
>
> box overlaps actors or sphere it will return an array then send the array through a for each loop then you need to cast it to the structure or parent you want and you can refine it more through casting  
> example this is how i go about refineing a crop plot to auto put fertalizer in it i need the break there to prevent a dupe bug  
> [http://i.imgur.com/g9Pe8FM.png](http://i.imgur.com/g9Pe8FM.png)
> 
> this one is poop collection  
> the max inventory limit function is tells me when a certian inventory is full  
> and the pooptype goes through a casting cycle to determin what poop to add to the inventory  
> [http://i.imgur.com/5f07CZW.png](http://i.imgur.com/5f07CZW.png)  
> the way i see what type of poop it is  
> [http://i.imgur.com/amJwPxw.png](http://i.imgur.com/amJwPxw.png)

That’s perfect, thank you!
