Animator GUI

From Zero-K
Jump to navigation Jump to search

This is a quick tutorial about how to use the Animator GUI development tool.

Animator GUI[edit]

The animator GUI lets you create animations for LUS units. The following is an example of how to use it.

  • When you run spring, make sure you do it so you can see the console output. Either use a commandline prompt or run it with a text editor that supports it like Komodo Edit or Notepad++.
  • Spawn a Glaive.
/give armpw
  • Enable: F11 > Developer Tools > AnimatorGUI
  • Select the Glaive. *Note*: If it was already selected, deselect and reselect.
  • A tree-view will show the pieces on the glave. Click on the piecename's button to select it. If you want to be sure you chose the right piece, use the Hide/Show buttons to check.
  • You can move and rotate pieces to make a pose (mostly you'll use rotate, not move).
  • When you have a pose, click Write Out.
  • In the console, copy the POSENAME function it outputs and paste it into your LUS. Give it a name (for example we'll call it punch). Notice that it takes two parameters, one for turnspeed and one for movespeed.
  • Add the following code in your LUS after the punch:
function script.TestThread()
    StartThread( punch, 1, 1.5 )

This function will tell the LUS to start your punch pose function as a separate thread. All animation calls must be within forked threads rather than synchronous within functions. It is passing 1 for mspeed and 1.5 for tspeed to the punch pose.

  • Reload luarules to reload the changes to your LUS:
/luarules reload
  • Click on Reset to reset all the pieces' positions.
  • Click on the "Test Thread" button to see your pose in action.
  • You can now start the pose threads in actual LUS callins such as FireWeapon1.

Further reading[edit]