playMaker

Author Topic: Need helps on character demo.  (Read 2388 times)

detomato

  • Playmaker Newbie
  • *
  • Posts: 36
Need helps on character demo.
« on: January 18, 2014, 04:41:19 AM »
Hi, I have very little knowledge of coding hence I'm here. But Playmaker still very new to me. So I'm looking for tips/helps to use it for my character demo reel. Here's what I'm trying to achieve.

Say, I have 10 character. Each have spawning, idle, running, walking, 2 attack and dying animation. I want to know how to get from spawning to idle animation. And when I called out a new character, the current character will have dying animation before the new character spawn with it animation.

I'm using NGUI as well, so I basically know how to assign it to a button.

Thanks in advance.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Need helps on character demo.
« Reply #1 on: January 30, 2014, 05:27:21 AM »
Hi,

 use "Play animation" action to trigger animations on your character.

But, I am not sure where NGUI comes into play if you have animations, can you elaborate on your character setup?

bye,

 Jean

detomato

  • Playmaker Newbie
  • *
  • Posts: 36
Re: Need helps on character demo.
« Reply #2 on: February 04, 2014, 12:00:00 PM »
Hi,

 use "Play animation" action to trigger animations on your character.

But, I am not sure where NGUI comes into play if you have animations, can you elaborate on your character setup?

bye,

 Jean

Hi Jean, thanks for the reply.
I use NGUI for button assigned to call different animation i.e attack 1, attack 2, running and walking. I know how to do that, so that is not my concern at all. My only concern is how to spawn a character with the spawn animation and continue to the idle animation. And also how to kill a character with 'killed animation' when I want to respawn another character. I have about 10 character altogether.

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Need helps on character demo.
« Reply #3 on: February 04, 2014, 01:39:16 PM »
Managing multiple animations on one character, I've learned, is one of the strengths of using FSMs.

Here's how I do it:

I have a separate bool for each animation. "isIdle", "isDead", etc. Different things in my game trigger these booleans to be set to true. For you, these would be your GUI buttons that the user clicks to view the animation.

I would have an FSM which constantly checks for changes to these bools, and then a change occurs, passes to a new state which uses the "animation settings" and then "play animation" PlayMaker actions. Your first state would be "spawn", where the spawn animation plays. As soon as this finishes (or another gui button is pressed), it would pass to the next state, where the idle animation plays, etc.

The trick is to properly set the "layer" of your animations within the "animation settings" action, as well as to select "stop all" or "stop same layer". These options will depend on your individual animations and character, so experiment with them as you progress. It took me a few tries to get them properly overriding each other.

« Last Edit: February 04, 2014, 01:42:07 PM by Breadman »

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • Grinder Games
Re: Need helps on character demo.
« Reply #4 on: February 05, 2014, 04:28:30 PM »
Or just download the mechanim action package from the wiki and make the animation graph with mechanim. Lots of possibilities ...