var entityNameToFind = "UrbanFemale.";
function ShowAnimation()
{
var objectToAnimate = scene.GetEntityByName(entityNameToFind);
console.LogInfo("Hey great, I found " + entityNameToFind +" Starting animation");
var availableAnims = objectToAnimate.animationcontroller.GetAvailableAnimations();
console.LogInfo(availableAnims);
}
else
{
console.LogWarning("Entity " + entityNameToFind + " was not found or animation controller component is not there! Trying again in 1 second.");
frame.DelayedExecute(1.0).Triggered.connect(StartAnimation);
}
}
// Only run on client. One time animation enabling.
if (!server.IsRunning() && !framework.IsHeadless())
{
StartAnimation();
}