Loading...
  OR  Zero-K Name:    Password:   

Post edit history

[AnimatorGUI] How to use the Animator GUI widget.

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
10/17/2015 2:06:41 PMMYrankAdminHistidine before revert after revert
Before After
1 \n
2 \n
3 \n
4 = Animator GUI = 1 = Animator GUI =
5 \n
6 The animator GUI lets you create animations for LUS units. The following is an example of how to use it. 2 The animator GUI lets you create animations for LUS units. The following is an example of how to use it.
7 \n
8 * 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++. 3 * 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++.
9 \n
10 * Spawn a Glaive. 4 * Spawn a Glaive.
11 \n
12 {{{ 5 {{{
13 /cheat 6 /cheat
14 /give armpw 7 /give armpw
15 }}} 8 }}}
16 \n
17 * Enable: F11 > Developer Tools > AnimatorGUI 9 * Enable: F11 > Developer Tools > AnimatorGUI
18 \n
19 * Select the Glaive. *Note*: If it was already selected, deselect and reselect. 10 * Select the Glaive. *Note*: If it was already selected, deselect and reselect.
20 \n
21 * 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. 11 * 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.
22 \n
23 * You can move and rotate pieces to make a pose (mostly you'll use rotate, not move). 12 * You can move and rotate pieces to make a pose (mostly you'll use rotate, not move).
24 \n
25 * When you have a pose, click Write Out. 13 * When you have a pose, click Write Out.
26 \n
27 * 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. 14 * 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.
28 \n
29 * Add the following code in your LUS after the punch: 15 * Add the following code in your LUS after the punch:
30 \n
31 {{{ 16 {{{
32 function script.TestThread() 17 function script.TestThread()
33 StartThread( punch, 1, 1.5 ) 18 StartThread( punch, 1, 1.5 )
34 end 19 end
35 }}} 20 }}}
36 \n 21 \n
37 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. 22 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.
38 \n
39 * Reload luarules to reload the changes to your LUS: 23 * Reload luarules to reload the changes to your LUS:
40 \n
41 {{{ 24 {{{
42 /luarules reload 25 /luarules reload
43 }}} 26 }}}
44 \n
45 * Click on Reset to reset all the pieces' positions. 27 * Click on Reset to reset all the pieces' positions.
46 \n
47 * Click on the "Test Thread" button to see your pose in action. 28 * Click on the "Test Thread" button to see your pose in action.
48 \n
49 * You can now start the pose threads in actual LUS callins such as FireWeapon1. See http://springrts.com/wiki/Animation-LuaScripting 29 * You can now start the pose threads in actual LUS callins such as FireWeapon1. See http://springrts.com/wiki/Animation-LuaScripting