Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Model Engine 4 Model Engine 4
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 111
    • Issues 111
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • Model Engine 4Model Engine 4
  • Wiki
    • Skills
    • Mechanics
  • StateToggle

StateToggle · Changes

Page history
wiki standardization authored Oct 21, 2024 by Lxlp's avatar Lxlp
Hide whitespace changes
Inline Side-by-side
Showing with 1 addition and 1 deletion
+1 -1
  • Skills/Mechanics/StateToggle.md Skills/Mechanics/StateToggle.md +1 -1
  • No files found.
Skills/Mechanics/StateToggle.md 0 → 100644
View page @ 058ef9f7
[< Back to mechanic page](/Skills/Mechanics)
## Description
Toggle a state on the model. In other words, if the model has an animation, it will remove it. Otherwise, it will be
added.
## Attributes
| Attribute | Aliases | Description | Type | Default |
|------------|---------------|--------------------------------------------------------------------------------------------------------|---------|---------|
| modelid | m, mid, model | Targeted model | String | |
| state | s | Targeted state | String | |
| speed | sp | Speed multiplier of the state | Double | 1 |
| lerpin | li | Transition tick when the animation starts | Integer | 0 |
| lerpout | lo | Transition tick when the animation ends | Integer | 1 |
| force | f | Should the animation be played again even if it is already playing | Boolean | true |
| ignorelerp | i | Should the state be instantly removed without transition | Boolean | false |
| priority | p, pr | Target the animation of a particular priority<br/>Only parsed when model is using new animation system | Integer | 1 |
## Examples
In this example, we will assume the model is something akin to a machine that can be turned on or off, playing different animations based on that.
We can achieve this simply with the following:
```yaml
Skills:
- StateToggle{mid=ExampleModel;state=activated} @self ~onInteract
```
And then interacting with the model will either play or stop the "activated" animation, depending on the previous state
## Aliases
- [x] togglestate
\ No newline at end of file
Clone repository
Home
FAQ / Common Issues
Commands & Permissions
Configuration

Modeling
  • Creating a Model
    • Hitbox & Eye Height
    • Shadow
  • Bone Behaviors
  • Animating a Model
  • Importing a Model
  • Scriptable Keyframes
  • Optional Tools
MythicMobs
  • Mechanics
  • Conditions
  • Targeters
Citizens (R4.0.4)
  • Trait
  • Commands & Permissions

API
  • Basic
    • Apply / Remove Model
    • Play / Stop Animation
    • Configure Bone Behaviors
    • Mounting / Dismounting Model
    • Per-Player Model
    • Events
  • Advanced
    • Custom Base Entity
    • Custom Mount Controller
    • Custom Importer
    • Custom Bone Behaviors
    • Custom Script Reader
    • Custom Timeline
    • Custom Animation Handler
    • Custom Render Type

Technical
  • Terminology
  • Animation Systems
  • Mount Controllers
Promotional Material