playMaker

Author Topic: Get IndexInt (under parent) of a Stored Game Object Variable  (Read 1946 times)

westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • My Video Game Projects Web Site
Get IndexInt (under parent) of a Stored Game Object Variable
« on: August 24, 2019, 06:32:59 PM »
I have a game object variable, and I need to find out what its number is, under its parent. It has many siblings all of which have the same name ("entrance") and tag "Interaction Spot." The childs are all identical EXCEPT for their index number.

detailed explanation:
Under _Entrances game object, there are two roots called HomeExt and HomeInt. Both have their own set of game object children, all called entrance. When you click on any entrance child under HomeExt, I need to get that index, then get the child at the same index under HomeInt, and teleport you to that game object's location. This will smoothly allow players to teleport into and out of buildings by clicking any door or window.

This person requested this and another thing, and got the other thing, but not this one. https://hutonggames.com/playmakerforum/index.php?topic=4708.0


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7624
    • jinxtergames
Re: Get IndexInt (under parent) of a Stored Game Object Variable
« Reply #1 on: August 25, 2019, 06:59:10 AM »
Hi.
On the Ecosystem there is an action called "Get Transform Sibling Index"
maybe that can help.

there is aslo a 'Set' version