playMaker

Author Topic: How to change value in Interactive Cloth?  (Read 3305 times)

gecko

  • Junior Playmaker
  • **
  • Posts: 52
How to change value in Interactive Cloth?
« on: September 10, 2013, 10:48:23 PM »
I am trying to create an FSM that changes the External Acceleration value in an interactive cloth in the scene. I'm guessing that I need to use Set Float or something like that, but I really don't know how to go about this -- what action to use, and especially how to connect it to the interactive cloth parameters. I want to have the Ext. Acceleration alternate between a high value and a low value every 5 seconds.

If anyone is willing to help me, please be very specific, to minimize dumb follow-up questions from yours truly. I can't find anything in the docs about how to do this -- I think they assume more scripting know-how than i have.

thanks!
Dave

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to change value in Interactive Cloth?
« Reply #1 on: September 11, 2013, 02:44:15 AM »
Hi,

 you can access this using "set property" action, and you want to feed it a Vector3, not a float. the acceleration can be of any direction, so it's not just a float.

Are you ok using "set property" action?

Bye,

 Jean

gecko

  • Junior Playmaker
  • **
  • Posts: 52
Re: How to change value in Interactive Cloth?
« Reply #2 on: September 11, 2013, 09:39:24 AM »
I have a Set Property action on my FSM now, plus a "Set FSM variable" (guessing on that)...but I don't understand how to configure each one. See attached. I must be close, right? But what do I set for the "Property" field on Set Property to connect to the External Acceleration function in Interactive Cloth?

Sorry if this is basic Unity coding; any help appreciated!

thanks
Dave

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to change value in Interactive Cloth?
« Reply #3 on: September 12, 2013, 01:01:23 AM »
Hi,

 you need to drag and drop the interactive cloth component itself, not just the gameobject, so with your mouse, you really drag the component itself ( its toolbar for example). The it will understand you want to set the property of that component on that gameobject, not just the gameobject itself.

 
 Bye,

 Jean

gecko

  • Junior Playmaker
  • **
  • Posts: 52
Re: How to change value in Interactive Cloth?
« Reply #4 on: September 12, 2013, 11:20:33 AM »
Thanks, that makes sense....but I can't figure out how to do that. If I select the Interactive Cloth GO in order to display the components in the inspector, then the FSM isn't displayed in the Playmaker window, so there is nowhere to drag the IC component to. I must be ignorant of some obvious Unity functionality, but I'm stumped....

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to change value in Interactive Cloth?
« Reply #5 on: September 13, 2013, 03:06:47 AM »
Hi,

 yes, there is a small dance to learn here.

Lock the fsm editor ( using the "lock" button on the top tool bar", then you can select another go to drag and drop form the unity inspector.

yes?

bye,

 Jean

gecko

  • Junior Playmaker
  • **
  • Posts: 52
Re: How to change value in Interactive Cloth?
« Reply #6 on: September 13, 2013, 09:55:14 AM »
....and a whole new world opens up. Thank you!!