Home » Updates » Change log -> random actions + chat color
Updates

Change log -> random actions + chat color

Added an example in client.html that shows a quick example to do random avatar actions

if (avatarItem.Action.CurrentFrame >= avatarItem.Action.Frames) {
var currentAction = avatarItem.Action; // keep current X/Y
avatarItem.Action = avatarItem.Actions[Math.floor((Math.random() * avatarItem.Actions.length) + 0)]; //get a random action
avatarItem.Action.IsReverse = Math.floor((Math.random() * 50) + 1) <= 25; //random direction
avatarItem.Action.CurrentPosX = currentAction.CurrentPosX;
avatarItem.Action.CurrentPosY = currentAction.CurrentPosY;
}