xmoonproductions.org
https://xmoonproductions.org/

Animation commands (Code)
https://xmoonproductions.org/viewtopic.php?f=27&t=4430
Page 1 of 1

Author:  Eskarn [ Fri Feb 05, 2016 11:05 pm ]
Post subject:  Animation commands (Code)

Heres a small bit of code to make adding poses easier
note this will only work for static poses

This requires already made animations on the same characterShape.obj
It also requires them to be set in the char_base.dat
NLP words must be added

First add the following


init\std\template\char\brain\code

run.dat

Code:
[ACUSTOMPOSES0]    acustomposes();


ref.dat

Code:
acustomposes0    {#include "init/std/template/char/brain/code/ref/acustomposes_ref.dat"}


init\std\char\brain\code\run

state.dat

Code:
#include "init/std/template/char/brain/code/run/acustomposes.dat"




https://www.dropbox.com/s/6gofhd0m0xdwzez/acustomposes.rar?dl=0
add the acustomposes.dat to the run folder

init\std\char\brain\code\ref

add the acustomposes_ref.dat to the ref folder

EXAMPLE FILES
https://www.dropbox.com/s/nl6jq0u0kn7km1n/aucstomposesEXAMPLE.rar?dl=0

how to use

add all of the above

make sure all the animations are on the same characterShape.obj
Make sure the animations are added in the char_base.dat
make the nlp words for each of your poses

http://wiki.xmoonproductions.org/index.php?title=Tutorial_for_NLP

open the basic_ref_command.dat

add

Code:
whatever.the.nlp.is =
{

 
     loc.ss.state  = ACUSTOMPOSES0;
   loc.ss.state2 = POSE1;//poses go from POSE1 to POSE5 feel free to add more in the acustomposes.dat in the run folder

    
  set_state(loc.ss);
}


in the acustomposes.dat

Code:
  [POSE1]

  {
loc.sp.pose_type = KNEEL;//change this to your pose
loc.sp.pose_id   = 0;
SetPose(loc.sp);
state.dyn.me.do.state2 = NOTHING;
  }



then ingame say the nlp words and the pose should activate then say stop for it to stop
add as many poses as you like

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/