playMaker

Author Topic: Difference: Set Game Object and Get Owner[SOLVED]  (Read 840 times)

gregacuna

  • Full Member
  • ***
  • Posts: 143
Difference: Set Game Object and Get Owner[SOLVED]
« on: March 02, 2020, 03:13:10 AM »
Not sure if I'm doing this right, but I often find the need to set a game object to a variable so that it can then be turned on and off whenever needed. If I'm not thinking right about this would love to hear how it should be done. If I'm on the right track one question:

What is the difference between the "Set Game Object" and "Get Owner" actions? I realized I've been using both of them to do the same thing. They seem to be working, but would like to be more consistent so curious to know if one is better than the other for my purposes.

Thanks!
« Last Edit: March 03, 2020, 01:57:57 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Difference: Set Game Object and Get Owner
« Reply #1 on: March 02, 2020, 06:05:17 AM »
Hi,

 Set GameObject action let you decide of what GameOject to reference. It can be anything ( dragged from the editor, or from a variable)

 Get Owner action only record the reference of the gameobject that is running this very FSM.

GetOwner is often used prior actions that do not provide the convenient preset of choosing the owner as the target. it's also very powerful inside templates for example.

Bye,

 Jean

gregacuna

  • Full Member
  • ***
  • Posts: 143
Re: Difference: Set Game Object and Get Owner
« Reply #2 on: March 02, 2020, 06:51:51 AM »
Thanks Jean!