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 → Body part visibility duration
For this functionality in specific I think its best if you use your own logic for the job.
Body part visibility is just a shortcut to "SetActive" the linked game object:
gameObject.SetActive(true);
What you could do is create an external script, attach it to your character prefab, and use an event handler like "OnMove" and set a specific body part on and off:
GameObject bodyPart; // or whatever game object you want to toggle activity
void Awake()
{
UFE.OnMove+= this.OnMove;
}
void OnMove(MoveInfo move, ControlsScript player)
{
if (move.moveName == "Make it invisible")
{
bodyPart.SetActive(false);
}
}
For more on coding and events checkout this page:
http://www.ufe3d.com/doku.php/code#global_events
Edit: You can also use the "OnBodyVisibilityChange" event for that:
void OnBodyVisibilityChange(MoveInfo move, CharacterInfo player, BodyPartVisibilityChange bodyPartVisibilityChange, HitBox hitBox)
Are you looking to enable or disable an object on a certain frame of a move?
This is much appreciated @Mistermind I will take this approach and post my results.
@Freedterror, no i just want a bodypart to stay visible for a few seconds after a move is
done. but a think i can work it out from here. Im an artist im not very good at coding,
i just need to be pointed in the right direction sometimes. LOL Thank you both for replying.
Universal Fighting Engine Forum → Source Coding → Body part visibility duration
Powered by PunBB, supported by Informer Technologies, Inc.