Problem With State Machines Start & Stop

Problem With State Machines Start & Stop

PostPosted by AlbertMunto » Tue May 15, 2012 3:52 am

hi
im looking some help.
my english not very well. i tried to discribe the problem i got
i got a problem when i tried to start and stop parallel state machine.
i try to set up character animation project as the soldier demo in the sage package
it look likes the parallel state machine "Arms" can be stop or start
then i try to make a same structure. i wrote a .cs code like this:

if (Input.GetKeyDown(KeyCode.Space))
{
controller.Stop_Up_BodySM(0.25f);
//m_Action = 1f;
}

if (Input.GetKeyUp(KeyCode.Space))
{
controller.Start_Up_BodySM(0.25f);
//m_Action = 0f;

but when i entered play mode it return a error message:

[Sage] Unable to find active state machine on Sage Controller, "Up_Body"!
UnityEngine.Debug:LogError(Object)
SageController:StopStateMachine(String, Single)
SageLibrary_BaseController:Stop_Up_BodySM(Single) (at Assets/SageLibrary_BaseController.cs:1433)
BoyInput:Update() (at Assets/BoyInput.cs:83)

it mean the procedure can't find paralle state machine,
but i exactly builded a same name state machine in the SageLibrary Graphs
what i did wrong? can you help me?

thanks
AlbertMunto
 
Posts: 5
Joined: Tue May 15, 2012 2:03 am

Re: Problem With State Machines Start & Stop

PostPosted by AlteredReality » Wed May 16, 2012 12:01 am

That seems like it could be a bug with the code generation with a state machine that has spaces or invalid characters in it's name. What exactly is your state machine named? Is your state machines name "Up Body"? If so, I'd recommend removing all spaces (and all special characters) from the name of your state machines, export scripts, and try again. Please let me know if that fixes the issue for you.

However, I just did a test with Sage 1.5.2 where I named my state machine "Arms Test", and it worked just fine. What version of Sage are you using? I'll look into this more and see if I can reproduce it.
Andy - Altered Reality
AlteredReality
Site Admin
 
Posts: 118
Joined: Fri Jan 06, 2012 8:31 pm

Re: Problem With State Machines Start & Stop

PostPosted by AlbertMunto » Wed May 16, 2012 10:27 pm

i found what is the cause of error
first i forgot to turn off start active option under PSM panel
and i made a mistake on the controller order arrangement
after some practice and test,
now i can turn on and off the PSM/SM which i wanna control,
great thanks for your help and answer

but i got another question
i made a lot of SM/PSM in the graphs, that will cause a game performance drop down or not?
should i keep low number of SM/PSM ?

thanks
AlbertMunto
 
Posts: 5
Joined: Tue May 15, 2012 2:03 am

Re: Problem With State Machines Start & Stop

PostPosted by AlteredReality » Wed May 16, 2012 10:42 pm

Good to know you got it working! I'll still try and see if I am able to reproduce your initial issue so that I can make sure it doesn't happen to anyone else. :-)

As for the number of state machines and parallel state machines...I don't think the number of either really matters for performance. Performance should mostly be affected by the number and complexity of your blend graphs, as well as how many animations are being processed and played at once.

Let me know if you have any other questions.
Andy - Altered Reality
AlteredReality
Site Admin
 
Posts: 118
Joined: Fri Jan 06, 2012 8:31 pm


Return to Questions and Discussion

Who is online

Users browsing this forum: No registered users and 0 guests


Style by Gokinstudio | Free forum hosting by ProphpBB | Software by phpBB | Report Abuse | Privacy
cron