playMaker

Author Topic: Enable/Disable Animation Component Property[SOLVED]  (Read 4834 times)

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 125
    • MABManZ.com
Enable/Disable Animation Component Property[SOLVED]
« on: August 06, 2013, 04:23:13 PM »
Here is what I'm trying to do specifically:

- Enable/disable animation property of a character with "animation" component to initiate a ragdoll. The animation disables, and after the ragdoll conditions end, the animation component re-activates.

This works fine under normal conditions using the "Set Property" actions, but I'm attempting to allow this action to take place on potentially different characters spawned from prefabs, so I'd like to be able to activate/deactivate the animation component of a gameobject variable.

(I believe the existing Enable Animation action is for actual animations, not the animation component of a gameobject)
« Last Edit: August 08, 2013, 03:09:33 AM by jeanfabre »

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 125
    • MABManZ.com
Re: Enable/Disable Animation Component Property
« Reply #1 on: August 06, 2013, 08:25:57 PM »
Well I figured this out myself after fiddling around:

Create an "object" variable that matches the component property (in my case, the animation enabled component). Then use "Get Object" action to store the component as a variable. You can then set the properties of the stored object variable with "Set Properties" action...