# How to generate cover points out of runtime

**URL:** <https://forums.unrealengine.com/t/how-to-generate-cover-points-out-of-runtime/370208>\
**Category:** AI\
**Tags:** data, map-load, unreal-engine, construction-script, generation, UE4, question\
**Created:** [September 12, 2016, 3:58pm UTC](https://forums.unrealengine.com/t/how-to-generate-cover-points-out-of-runtime/370208 "2016-09-12T15:58:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_210522a1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_210522a1](https://forums.unrealengine.com/u/anonymous_user_210522a1)\
**Post date:** [September 12, 2016, 3:58pm UTC](https://forums.unrealengine.com/t/how-to-generate-cover-points-out-of-runtime/370208/1 "2016-09-12T15:58:58Z")

</div>

So I want to make a system in which the AI uses coverpoints, but I don’t want to manually place. I have worked out a blueprint which does this in the construction script and creates Actorcomponents, however I would like to generate it once, like I click build and it also runs that script. Also how would I store this data after I ran the script so I can load it up once I load the map?

Any help would be apreciated.

-

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_210522a1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_210522a1](https://forums.unrealengine.com/u/anonymous_user_210522a1)\
**Post date:** [September 18, 2016, 1:13pm UTC](https://forums.unrealengine.com/t/how-to-generate-cover-points-out-of-runtime/370208/2 "2016-09-18T13:13:00Z")

</div>

I figured it out myself:

I have a SaveGame file which stores a transform and an array of structs for my cover points.  
In the construction script of the cover I make a string which is an append of the Current level name and the self reference to string. I then check if this save slot already exists, if it does I check if the transform is equal to the saved transform, if it is I continue to load from the save game, if not I run my script to calculate everything, this also happens if the save slot doesnt exists.

-
