playMaker

Author Topic: Can I compare properties of slotted game objects and scriptable objects?  (Read 530 times)

Joakim

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Hi, in playmaker, is there an action or event which can compare values of properties of classes which are attached to a game object, compare those with another objects properties.

Concerete example would be, on my scene I have a "Building" game object with Building.cs monoBehavuor attached to it, this .cs has int Tier property. Now on enabling my UnitBuild Canvas I want to turn on Tier 2 panel object if Tier of my building is greater than 1.

So I'd like to create a comparison action which is triggered on my canvas BecameVisible, then slot my building object into my action, select Tier property, select comparison operator ">" and enter number 1 in another field, and if true then trigger unity event which activates my panel canvas.

Another use case would be using scriptable objects, comparing if health property of scriptable object "PlayerSO" is less than damage property of "EnemySO".

See attached picture "Example.jpg".
Something like that, but also with an option to manualy enter value instead of slotting object2.


Thanks!
« Last Edit: June 02, 2018, 09:13:39 AM by Joakim »