playMaker

Author Topic: How to control jumping section of character motor via playmaker?  (Read 4911 times)

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
I'm trying to use the jumping features of the character motor script i've added to my character

I created a get button down event that takes me to a Jump state

on that state i put a "send message" event with the method name pointing to "ApplyJumping"

which i think is the function on the character motor that makes the character jump. but not having any success

anyone know how to access it correctly?

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: How to control jumping section of character motor via playmaker?
« Reply #1 on: March 03, 2012, 04:27:27 PM »
Are you using this character motor action? -  -
http://hutonggames.com/playmakerforum/index.php?topic=321.0

That might make your job easier.  Let me know if it does not.

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: How to control jumping section of character motor via playmaker?
« Reply #2 on: March 03, 2012, 05:23:31 PM »
Awesome!, ill check it out thx

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: How to control jumping section of character motor via playmaker?
« Reply #3 on: March 03, 2012, 05:37:21 PM »
Ok I"ve added it to my character along side the actions for "controller simple move" and "Smooth Look at Direction".  Is that all i need to do to get jumping working?

in player input, my joystick button 0 is mapped to "Jump" as well,

its not jumping though :(

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: How to control jumping section of character motor via playmaker?
« Reply #4 on: March 03, 2012, 05:39:38 PM »
Im a visual person.  Take a screenshot of your FSM and past it in the thread? 

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: How to control jumping section of character motor via playmaker?
« Reply #5 on: March 03, 2012, 06:15:36 PM »
Here ya go


justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: How to control jumping section of character motor via playmaker?
« Reply #6 on: March 07, 2012, 12:37:25 PM »
My Solution to my problem in case anyone else was having a similar issue was to get rid of all of my actions in my "movement" fsm.

Your capsule main character should only have the following on it

character controller
character motor
platform input controller

then you can use the action "character motor action" and it will work correctly

the "get axis and controller simple move" was overwriting the other components.  they were both trying to drive the capsule at the same time, and the fsm was winning out.

smiffy

  • Junior Playmaker
  • **
  • Posts: 54
Re: How to control jumping section of character motor via playmaker?
« Reply #7 on: April 19, 2012, 12:40:48 PM »
I had this problem too but on ios as it doesnt use Unity's input section.

Got around it by adding the following code to CharacterMotor.js

private function iosJump(){
inputJump=true;
}

Then use the invoke method action to call it.