Pages 1
Universal Fighting Engine Forum We are no longer using the forum to answer questions due to bot attacks. Please use our discord instead: https://discord.gg/hGMZhF7 |
You are not logged in. Please login or register.
Universal Fighting Engine Forum → Source Coding → Programmatically Change Stance
Yeah, you can do that.
Code example:
using UnityEngine;
using UFE3D;
public class ChangeStance : MonoBehaviour
{
private bool rageMode;
private void Start()
{
UFE.OnLifePointsChange += this.OnLifePointsChange;
}
void OnLifePointsChange(float newLifePoints, ControlsScript player)
{
if (!rageMode && player.currentLifePoints <= 20)
{
rageMode = true;
player.MoveSet.ChangeMoveStances(CombatStances.Stance2);
}
}
}
Thanks, do you know if the stance changes instantly, in the same frame?
I would imagine it does.
Universal Fighting Engine Forum → Source Coding → Programmatically Change Stance
Powered by PunBB, supported by Informer Technologies, Inc.