playMaker

Author Topic: I need some help  (Read 109 times)

cipriannevolnicu

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
I need some help
« on: April 04, 2021, 05:37:32 AM »
I've got two problems i need to resolve.

First problem is i have a crouch animation i need to implement into the playmaker, everytime i press CTRL it's animate the animation crouch, how do i do that.

Second problem i want to add footsteps into the game, everytime the player walks the footsteps sound is added, how do i do that.

Thank you.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15443
  • Official Playmaker Support
    • View Profile
Re: I need some help
« Reply #1 on: April 12, 2021, 04:39:15 AM »
Hi,

 for the foot steps, I would try some assets meant to solve that for you first, list this free one for example:

https://assetstore.unity.com/packages/tools/audio/free-footsteps-system-47967


else, one simple the solution is to attached triggers to the feet that react only if they trigger floor or terrains and play a foot sound when it does. that's the basic idea.


the crouch animation will be solved using Animator, you need to setup your animator to have crouching, and hook that with an animator variable ( a boolean, that you will name "Crouch"), and then you control this boolean using the action SetAnimatorBool.

So from playmaker, it's very easy, it's the Animator setup that requires work.

Bye,

 Jean

Thore

  • Sr. Member
  • ****
  • Posts: 480
    • View Profile
Re: I need some help
« Reply #2 on: April 12, 2021, 04:56:14 AM »
Second problem i want to add footsteps into the game, everytime the player walks the footsteps sound is added, how do i do that.

In the animation timeline, add animation events where the foot touches the ground.
https://docs.unity3d.com/Manual/script-AnimationWindowEvent.html

Then, in the list, select PlayMaker's SendEvent and provide the name of a global event in playmaker that you want triggered at that animation frame. In the PlayMaker state, add the foot's sound.