-
Notifications
You must be signed in to change notification settings - Fork 4
Importing Custom Animations in Code
Nunchuk/ToasterOven edited this page May 16, 2022
·
2 revisions
For this page, we will just take a look at the Example Plugin and how it works.
If you want to just see info on what general control you have over emotes, please refer to the terribly written documentation page.
Starting with the awake function and some basic plugin items:
- You don't actually need a RoO dependency, however in this example we setup a button to T-Pose, which utilizes RoO's integration so you don't have to restart to change key binds.
- Everyone needs all emote mods, due to the nature of everything having to sync, there would be some random issues if emote mods are not synced.
- In awake, we start by just binding settings to RoO and loading in our example_emotes AssetBundle.
- Afterwards, we call AddCustomAnimation twice, once for the backflip animation, and once for the t pose animation. Keep in mind, the name of your animation in game is equal to the name of the .anim file.
- Then finally, we hook into some events which CustomEmotesAPI will spit at you sometimes
- The first two events listed here are completely unused, I just left them in since they should be noted as usable.
- The third event fires every time an emote changes on a BoneMapper. We use this event to keep track of a current event (however keep in mind, since this event fires on ANY BoneMapper that changes animation, this is not a perfect system and should only be used as a starting point)
- In the update loop, we are just checking if the TPoseButton is pressed or not, and if so, playing the T Pose animation.

