# Set actor location with animation

**URL:** <https://forums.unrealengine.com/t/set-actor-location-with-animation/460558>\
**Category:** Character & Animation\
**Tags:** setactorlocation, unreal-engine, transform, transition, question\
**Created:** [January 14, 2020, 12:37pm UTC](https://forums.unrealengine.com/t/set-actor-location-with-animation/460558 "2020-01-14T12:37:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0202af0f1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0202af0f1](https://forums.unrealengine.com/u/anonymous_user_0202af0f1)\
**Post date:** [January 14, 2020, 12:37pm UTC](https://forums.unrealengine.com/t/set-actor-location-with-animation/460558/1 "2020-01-14T12:37:46Z")

</div>

i’m making a 2048 game and i made a function that finds what tile to move and where and returns it, i tried to use lerp and timeline in the event graph to achieve the transition animation, but i need to move more than one tile at once, and i can’t use a timeline more than once at the same time, so it only moved one tile every time, how can I set the location of multiple tiles with animation at once?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [January 14, 2020, 3:15pm UTC](https://forums.unrealengine.com/t/set-actor-location-with-animation/460558/2 "2020-01-14T15:15:26Z")

</div>

You could reuse the timeline as many times as there are tiles. An implementation could look like this, for example:

 ![295304-moveit.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/1/2a15a4421cee2b50e0b16da65a56376efab362c1.png)

- keep the tiles _ToMoveOn_ in an array (here, _Begin Play_ just adds random tiles for demo purposes - you probably already know which tiles the player will move through - use that instead)
- when the _TimeLine_ plays, move the actor (_aMover_) between tiles 0 & 1 using _TL_ _track_ + _Lerp_ combo
- when the _TL_ finishes, remove tile 0 (since we moved away from it) and check if at least 2 tiles still remain
- if there are, restart the TL
- if there are not, it means we’ve reached the very last one and the TL can be stopped

* * *

This can be improved, of course, but that’s the gist. In motion:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/0/dd0c5f62d6704b0890909eee6a7be913cce57d5d.gif)](https://gyazo.com/c98e8fd225c61176155934d9cc4bd75b)

Hope it helps.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [January 14, 2020, 3:20pm UTC](https://forums.unrealengine.com/t/set-actor-location-with-animation/460558/3 "2020-01-14T15:20:49Z")

</div>

Another (untested) way could be to use an _InterpToMovement_ component and feed it a set of points; but you’d lose granular control the above solution provides. Simple yet somewhat elegant.
