Overview
Learn how to make a toggleable entity with the ToggleEntity plugin!
The plugin
Before everything, you will this plugin for your mod to work :
[link]
Seting-up the mod
The first thing to do is to create an animation to toggle the toggleable part of your entity.
Create the animation you want for the default state, and add a new one for the other state
You will now have to open the Animation Controller to make your entity toggleable.
Here is how it will look once finished :
The properties on the left are the booleans to toggle the animations. You have to follow the exact names of the plugin.
The “RoofDefault” box is the default animation of your entity :
The “Open” box is the triggered animation. Here figures the animation that disables the roof:
And the arrows are the transition between the enabled and disabled animation. They both have a condition to switch to the other animation. One is when the boolean is enabled, the other is when the boolean is disabled:
To create the boolean, click the “+” in the parameters. You can use multiple layers to manage multiple animations at once.
You can also create the transitions by right-clicking the boxes.
You can try to play the scene and toggle the boxes to check if your animation plays correctly.
Don’t forget to setup your client properties to add the animator and the event action (use the label you want, and make sure to use the plugin IDs):
Once done, you can build your asset.
Plugin References
Normal actions (usable by anyone):
– InteractionPlugin
– InteractionPlugin2
– InteractionPlugin3
– InteractionPlugin4
Driver actions (only for the driver):
– InteractionPluginDriver
Passenger actions (only for the passengers):
– InteractionPluginPassenger
Ocupants actions (for any person mounting the entity):
– InteractionPluginAnyPassenger
Normal actions (usable by anyone):
– action1
– action2
– action3
– action4
Driver actions (only for the driver):
– driver
Passenger actions (only for the passengers):
– passenger
Ocupants actions (for any person mounting the entity):
– any
Example asset
Unity package file:
[link]
Ready-to-use file:
[link]