# Teleporting object between an array of postions over time

**URL:** <https://forums.unrealengine.com/t/teleporting-object-between-an-array-of-postions-over-time/481963>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [April 16, 2021, 8:20pm UTC](https://forums.unrealengine.com/t/teleporting-object-between-an-array-of-postions-over-time/481963 "2021-04-16T20:20:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aonexex](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aonexex](https://forums.unrealengine.com/u/Aonexex)\
**Post date:** [April 16, 2021, 8:20pm UTC](https://forums.unrealengine.com/t/teleporting-object-between-an-array-of-postions-over-time/481963/1 "2021-04-16T20:20:02Z")

</div>

Good afternoon, I am trying to make my skull teleport between two positions every two seconds. However all the attempts I have tried so far only manage to go to one position and then on re-entering the triggerbox there is a chance of switching the positions.

Being quite new I imagine there must be quite a simple solution that I cannot see.  
Any help is extremely Appreicated!

 ![335953-blueprint.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/e/7/1e7af2a2ee0e5d2ef8afc24173f70ee7dfaeea6c.png)

---

<div class="post-metadata">

**Author:** ![magerbeton](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@magerbeton](https://forums.unrealengine.com/u/magerbeton)\
**Post date:** [April 17, 2021, 10:46pm UTC](https://forums.unrealengine.com/t/teleporting-object-between-an-array-of-postions-over-time/481963/2 "2021-04-17T22:46:09Z")

</div>

So…  
There is a thing called a timer. It executes an event after a certain time. And it can loop.

Here some recources:

- [WTF Is? Set Timer in Unreal Engine 4 ( UE4 ) - YouTube](https://www.youtube.com/watch?v=qc5WpNq7RFg&t=304s)
- [Using Timers | Unreal Engine Documentation](https://docs.unrealengine.com/en-US/InteractiveExperiences/UseTimers/index.html)

Then there are so called arrays. They store multiple variables in one piece of data. And you can get a single variable by using a get node.

Here some more recources:

- [Blueprint Arrays | Unreal Engine Documentation](https://docs.unrealengine.com/en-US/ProgrammingAndScripting/Blueprints/UserGuide/Arrays/index.html)
- [WTF? Arrays - YouTube](https://www.youtube.com/playlist?list=PLSlkDq2rO1t6PkNmGURri0ET_s8whFzsg)

My aproach would look kinda like this:

 ![336248-logic.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/4/43422e064e4a70dad5fc8c837df832e6200a5eaf.png)

First i’d make the timer as it will be executing the code.  
Then the event which sets the actor location to one of the locations which i defined in the array:

 ![336249-positionarray.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/7/927ba5dc9779c1840af2be4e5e7267b88ba51e0c.png)

Thats about it.
