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 113
    • Issues 113
    • 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
    • Modeling
  • Scriptable Keyframes

Last edited by Lxlp Oct 21, 2024
Page history
This is an old version of this page. You can view the most recent version or browse the history.

Scriptable Keyframes

Using the script keyframe, you can now call MM skills or MEG commands at the exact animation frame. You can add new script keyframes by opening the effects timeline within Blockbench.
image
Afterward, add a new keyframe on the Instructions timeline. Instead of the normal XYZ input, you will see an input called Script.
image

MM Skills

You can call any custom-defined MM skills by using the prefix mm: and the skill name. For example:

Primary_5:
  Skills:
    - message{m="Get punched";audience=world} @self
    - explode @ModelPart{m=dr_axis;p=attack_point}

image
You can even use Skill Parameters within keyframes.

Primary_5:
  Skills:
    - message{m=<skill.dialogue>;audience=world} @self
    - explode @ModelPart{m=dr_axis;p=attack_point}

image

MEG Commands

MEG Commands are, by design, structurally very similar to MM mechanics. Currently, we have 7 commands which have the same attributes as their MM mechanic counterpart. However, all commands will only target the model you are editing.

  • changeparent = ChangeParent
  • partvis = PartVisibility
  • tint = Tint
  • enchant = Enchant
  • tag = SetModelTag
  • changepart = ChangePart
  • remap = RemapModel

To use a MEG command, you just enter it like using them as a normal mechanic.
image

Multiline scripts

You can write multiple lines of scripts into a single keyframe, and you can also mix and match different script types.
image
This keyframe would run the MM Skill that plays the dialogue and effect first, then the MEG command to enchant the arm bone.

Using Animation Variables

Finally, you can make use of the Variable Placeholder system provided by Blockbench itself. This system is also extremely similar to MM's variable system, and it works on both MM skills and MEG commands.
image

Video Demo

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: Model
  • Mechanics: VFX
  • Conditions
  • Targeters
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