playMaker

Author Topic: Adjusting Component properties...  (Read 4532 times)

Nekoyoubi

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 35
  • I scribble syntax, paint pixels, carve faces, and
    • Nekoyoubi Games
Adjusting Component properties...
« on: April 07, 2011, 08:07:28 AM »
I know I must be missing something simple here, but what would be the suggested way to modify a property on a GameObject's component using PlayMaker?

An easy example of what I mean would be adjusting an EllipsoidParticleEmitter.LocalVelocity property to (poorly) apply some force to a flame while a certain state of an FSM is active.

So many actions are so obvious to me that I'm sure I must just be missing the obvious somewhere. Is there an action to do this, or does a custom script need to be applied for any change to components that you want to do?

Any help would be greatly appreciated. Thanks much in advance!
« Last Edit: April 07, 2011, 09:19:49 PM by Nekoyoubi »
- Lance @ Nekoyoubi Games (nekoyoubi.com)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Adjusting Component properties...
« Reply #1 on: April 08, 2011, 12:16:34 AM »
Right now you have to write a custom action. The custom action is a simple interface to the component. See https://hutonggames.fogbugz.com/default.asp?W540 for an example.

I do want to make particle emitter actions for the next update.

Might also make some kind of custom action wizard for this kind of trivial component access...

tobbeo

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 186
Re: Adjusting Component properties...
« Reply #2 on: April 08, 2011, 02:20:45 AM »
I was thinking of creating a custom particle system using FSMs that would have a lot of features Unity's particle system doesn't have. Getting actions that give you access to the current particle system would be great too, I'm just sharing a thought.

What I think would be awesome is if you build a fairly complex FSM, like the one I mentioned, and have a wizard in Playmaker that builds a compounded "Super" action that exposes only the parameters that I choose. That way I could use my custom particle system in one neat "Super action" in a state wherever I please.

I think the idea of "Super actions" would be great, where you build a bunch of states/actions together and then Playmaker allows you to bundle this up into an action with only the parameters you choose to be exposed. You could re-use it easily. I guess I could always store it in a gameobject and have it called upon whenever I wanted but to adjust the parameters would be a bit trickier.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Adjusting Component properties...
« Reply #3 on: April 08, 2011, 10:13:03 AM »
Yes, "super actions" would help tremendously, especially for reusability. Virtools has something like that, you group some states together and make one entoty visually. Very handy.

 Bye,

 Jean