I’m working on a turn based rpg and have been researching methods for doing the animations and effects in battle. I was thinking about using Timeline because it would allow the artist and game designer to easily change animations or effects that play without any code changes.
The battles can have between 1-2 units on either side. A unit on one side can attack either unit on the other side. I can setup a timeline track to move a unit and play an effect but I do not know which position the unit is moving to until runtime. I’m wondering if it is possible to update the location of a game object in an animation track at runtime.
@bella964
Thank you for the detailed response. I’ve been playing around with timeline and reading the docs, so I’m familiar with most of what you mentioned. What I am trying to do is slightly different thought. There is no generic attack animation in the game so I cannot use a timeline per character. Each attack has custom movement and effects, which is why I think using the timeline would work really well (if possible).
An example scenario would be the player had two units and the AI has two units. The units never move in battle outside of attacking. The players first unit attacks the first unit of the AI and then the players second unit also attacks the first unit of the AI. Both units use the same attack and the animation and effects are the same.
I want to do one of two things:
A. Dynamically update the tracks in the timeline to move the attacking character. I think this is achievable through updating the generic binding or changing the parent of the attacking character to the object being moved. The parent change is a hack though
B. Dynamically change the start and end position of the effect that plays to first move from player unit one to AI unit one and then from player unit two to AI unit one. This would be changing the start and end frame positions on the timeline.