Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Breadman on December 20, 2016, 05:23:23 PM

Title: [SOLVED] Easier way to target components with "get property" action?
Post by: Breadman on December 20, 2016, 05:23:23 PM
Hello!

When using the "set property" or "get property" actions, I find that it's difficult to target a specific component of another object. For example, if my FSM on object A wants to check the property of a component on object B, I can add the "get property" action to my FSM on object A, but the object selection field doesn't let me select the component I want on object B - just object B itself. If I do it this way, the property selector for object B doesn't contain properties for the component I'm hoping to target - just the generic object properties for all objects, as they apply to object B (visibility, position, etc).

My work around is to create an empty FSM and/or state on object B. From here, I drag the component directly into the empty state and, at the resulting popup menu, select "get property". I then copy this action, return to the FSM on object A, and paste the action into the desired state, as this will retain the "target" component on object B. This works perfectly fine, but moving between objects and creating the empty FSM just to get the "get property" action targeting that component is a little inconvenient.

This is something I've been doing for a while, and I'm just wondering if there's a faster way that I'm missing!
Title: Re: Easier way to target components with "get property" action?
Post by: djaydino on December 21, 2016, 02:31:41 AM
Hi,
Select the fsm you want to place something in, then on the top from the playmaker window press 'lock' then you can click on another object and the fsm will stay highlighted

press it again to unlock
Title: Re: Easier way to target components with "get property" action?
Post by: mdotstrange on December 21, 2016, 03:28:32 AM
You can also create a custom action to get/set whatever components/properties that you like- I made a vid tutorial on how to make such actions here https://www.youtube.com/watch?v=U0zm2EVqDBU (https://www.youtube.com/watch?v=U0zm2EVqDBU)
Title: Re: Easier way to target components with "get property" action?
Post by: Breadman on December 21, 2016, 02:03:25 PM
Thank you both. The lock seems like an easy solution, I totally saw that button but never thought to try it!
Title: Re: [SOLVED] Easier way to target components with "get property" action?
Post by: djaydino on December 22, 2016, 04:47:24 AM
Hi,
It is always better to look if there are action for what you want to do on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)
or like mdotstrange suggested to make your own custom action when needed.
And if you think other people could use it, you can share them and make some people happy with it.

I myself started little to no knowledge of c# until i tried making my own actions just by looking how other action where build and how they work.