playMaker

Author Topic: [Solved] Random Mecanim Animation on trigger enter?  (Read 2196 times)

Playnoob

  • Playmaker Newbie
  • *
  • Posts: 21
[Solved] Random Mecanim Animation on trigger enter?
« on: May 23, 2016, 04:40:56 PM »
Hi All,
 I'd really appreciate if I could know the steps needed to trigger a random mecanim animation depending on entering a 'trigger' zone.

I understand there is a play random animation action, but this is for legacy and not mecanim.

This would really be a good action to have.
The nearest I came in searching was this: http://hutonggames.com/playmakerforum/index.php?topic=4492.0

But it is still a little beyond my programming knowledge.
Any help on how would be appreciated.
Best Regards.
« Last Edit: May 25, 2016, 08:39:18 AM by Playnoob »

Playnoob

  • Playmaker Newbie
  • *
  • Posts: 21
Re: Random Mecanim Animation on trigger enter?
« Reply #1 on: May 25, 2016, 05:21:30 AM »
no one? :(

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Random Mecanim Animation on trigger enter?
« Reply #2 on: May 25, 2016, 06:42:13 AM »
To do this- I put all the animations I wanted to be random in a blend tree- then I used Playmakers random int to create an int which I converted to float- I used that as a parameter to trigger a random animation on the blend tree-
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Playnoob

  • Playmaker Newbie
  • *
  • Posts: 21
[Solved] Re: Random Mecanim Animation on trigger enter?
« Reply #3 on: May 25, 2016, 08:38:51 AM »
    Thanks for replying mdotstrange.

    Blendtrees while I know I will have to learn them eventually... I gave the problem another look and came up with this:

    • Downloaded the Mecanim actions via the Playmaker resource tab (this was key to the solution - because these actions were not in the core playmaker package
    • created a variable to store 'string'

    The rest is in the attached picture.

    Was easier than I thought, but yeah that happened after the whole animator/mecanim extension was downloaded.

marking this thread, solved.
Cheers.