playMaker

Author Topic: [SOLVED] Easier way to target components with "get property" action?  (Read 3464 times)

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
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!
« Last Edit: December 21, 2016, 02:03:39 PM by Breadman »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Easier way to target components with "get property" action?
« Reply #1 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

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Easier way to target components with "get property" action?
« Reply #2 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
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Easier way to target components with "get property" action?
« Reply #3 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!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: [SOLVED] Easier way to target components with "get property" action?
« Reply #4 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
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.