playMaker

Author Topic: Set initial properties for Add Component  (Read 5138 times)

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 125
    • MABManZ.com
Set initial properties for Add Component
« on: January 09, 2012, 02:24:19 AM »
Maybe this is already possible, but I'd like to be able to change the property of a component that has been added via Playmaker during run-time.

Because the Set Property action requires you to drag the property from Inspector this is not possible as the component does not exist until run-time  ???

example: I want to add a collider at run-time on an object, but I want it to be a trigger.
« Last Edit: January 09, 2012, 03:13:07 AM by MABManZ »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Set initial properties for Add Component
« Reply #1 on: January 10, 2012, 10:44:49 AM »
Hi,

 :) possible actually

 the trick is to create first the fsmObject as a variable, then you can "get component" and use this variable to store the component in. Then you can "set property" of that variable, and you'll have access to trigger that way

 I have attached screenshots to show the setup.

Bye,

 Jean

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 125
    • MABManZ.com
Re: Set initial properties for Add Component
« Reply #2 on: January 13, 2012, 09:18:23 AM »
Thanks a lot this helps a ton  ;D