playMaker

Author Topic: reset an object  (Read 5782 times)

wallaceb68

  • Junior Playmaker
  • **
  • Posts: 87
reset an object
« on: September 19, 2013, 01:32:15 PM »
ok let me see if i can explain this.

i have an object with locomotion on it and a FSM
that FSM has several states that make the object do things.
one of the states plays just an animation.
what i need to know is how do i go from playing the animation back to a previous state with just locomotion on it? (beginning state)
every time i wire a transition back to the previous state it acts like it should(as far as moving and stuff) but is stuck in the animation position.(IE. not moving with locomotion) i have tryed stop animation, and it stop's the animation but doesnt reset it to the grounded pose.
 thanks

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3998
  • Official Playmaker Support
    • LinkedIn
Re: reset an object
« Reply #1 on: September 19, 2013, 04:40:24 PM »
Not sure I follow completely... did the animation move the character in a way that you want to reset? E.g., into the air, now you want the character back on the ground?

Does the previous state set a new animation to play? E.g., Idle.

Sorry, not picturing your setup yet... some screenshots or a screencast might help...

wallaceb68

  • Junior Playmaker
  • **
  • Posts: 87
Re: reset an object
« Reply #2 on: September 19, 2013, 09:01:54 PM »
Sorry about that, let me try agian.
i have a GameObject= a dog that has locomotion on it.
in playmaker FSM i have 4 states.
1st state the dog is just standing there waiting instruction. (button to "Lead")
with a transition "Next Area"
2nd state the dog is in "lead" with a smooth follow action (i can walk around and the dog goes with me walking with locomotion (button to "Guard"  with the transition "Next Area"
3rd state is the "play animation" the animation is the dog standing there barking ( i want him to stay in that one spot doing only that animation till i tell him to lead again.) with a button "Next Area" i what this button to take me back to the 2nd state of him in the "Lead" state.
i can get it to go back to that state but he is stuck in the "Guard" pose and locomotion isnt working.he will follow me but doesnt walk like he did in 2nd state. thanks again alex for all your help.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3998
  • Official Playmaker Support
    • LinkedIn
Re: reset an object
« Reply #3 on: September 19, 2013, 09:06:23 PM »
I assume the second state has a Play Animation action to start the walk animation?

Can you post a screenshot of the actions on the second state?

wallaceb68

  • Junior Playmaker
  • **
  • Posts: 87
Re: reset an object
« Reply #4 on: September 19, 2013, 09:33:52 PM »
State1

wallaceb68

  • Junior Playmaker
  • **
  • Posts: 87
Re: reset an object
« Reply #5 on: September 19, 2013, 09:34:29 PM »
State2

wallaceb68

  • Junior Playmaker
  • **
  • Posts: 87
Re: reset an object
« Reply #6 on: September 19, 2013, 09:35:00 PM »
state3

wallaceb68

  • Junior Playmaker
  • **
  • Posts: 87
Re: reset an object
« Reply #7 on: September 19, 2013, 09:35:30 PM »
state4

wallaceb68

  • Junior Playmaker
  • **
  • Posts: 87
Re: reset an object
« Reply #8 on: September 19, 2013, 09:37:06 PM »
alex no the only state with animation is the last one. it walks with locomotion. sorry i couldnt figure out how to post the pics in the screen.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: reset an object
« Reply #9 on: September 20, 2013, 02:52:30 AM »
Hi,

 you seem to have missing actions and errors on states. You need to correct that before  testing if animation works.

to post pics, you need to host them online, for example using dropbox or your web server if you have one.


bye,

 Jean

wallaceb68

  • Junior Playmaker
  • **
  • Posts: 87
Re: reset an object
« Reply #10 on: September 20, 2013, 08:18:09 AM »
Jean, the animation works fine, getting out of the animation is my problem. i'm going from a gameobject controlled by locomotion to animation back to locomotion control. i just cant get it to leave animation for locomotion control thats why the errors are there. i'm trying different things. thanks

wallaceb68

  • Junior Playmaker
  • **
  • Posts: 87
Re: reset an object
« Reply #11 on: September 20, 2013, 09:05:18 AM »
ok i have it working somewhat. in state 5 i put a "Create Object" followed by a "Destroy Self" which resets the object as a "Clone". it just seems to me that there should be a action to RETURN TO "A" PREVIOUS STATE not just RETURN "TO" PREVIOUS STATE.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3998
  • Official Playmaker Support
    • LinkedIn
Re: reset an object
« Reply #12 on: September 20, 2013, 09:30:59 AM »
What is the "locomotion control"? Is it a script?

It sounds like you have multiple scripts controlling the game object.

What is setting the locomotion animation in the first place?

wallaceb68

  • Junior Playmaker
  • **
  • Posts: 87
Re: reset an object
« Reply #13 on: September 20, 2013, 09:49:24 AM »
alex the locomotion is controlled by the "character controller" in the inspector window. the dog is controlled by the "smooth follow" and the "itween move to_v2"
so when the dog is told to follow a path or smooth follow the player the object will move on that path and the "character controller" will move his legs so it looks like he is walking as he goes on the path.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3998
  • Official Playmaker Support
    • LinkedIn
Re: reset an object
« Reply #14 on: September 20, 2013, 10:32:52 AM »
So where are you setting the walking animation? Is it the default animation in the Animation component? Can you just not use Play Animation in State 2 to play the walk animation?