playMaker

Author Topic: Mecanim, how to use get bool to transition to a state?  (Read 1967 times)

timurmehmet

  • Playmaker Newbie
  • *
  • Posts: 1
Mecanim, how to use get bool to transition to a state?
« on: October 19, 2014, 07:36:02 AM »
Hi there, I'm an artist traditionally, so I decided to get play maker to help me out..as lines of code somewhat terrify me  :P.
I've been going through the beginner tutorials and have set myself up a "bow firing" script in play maker.

At the moment, I have a player controller c# script (based on the stealth tutorial, and some tweaks/help from a friend)

My player movement script is already setting the "shoot" boolean, which plays the relevant animations.
My playmaker script (on the bow weapon, parented to the hand) just creates an arrow, adds a force etc.
Im now struggling to get the two to communicate....

I was wondering if playmaker could just "check" my characters animator(or script) if "shoot" bool is true, and if it is. Transition to its own state.
Cheers

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Mecanim, how to use get bool to transition to a state?
« Reply #1 on: October 19, 2014, 11:57:27 AM »
does the "shoot" happens when you press a key?

if so you could make an fsm with "on key down" and set bool there.

or you can check This solution