playMaker

Author Topic: Get previous child / Get Child index  (Read 3000 times)

DCassy

  • Playmaker Newbie
  • *
  • Posts: 5
Get previous child / Get Child index
« on: August 18, 2013, 12:18:53 PM »
Hello,

It would be useful to have, in addition to the get next child action, a get previous child one...
Also it would be great to have access to a game object child index (to have access to the number of the current object in the child index).

Best,

Antoine

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get previous child / Get Child index
« Reply #1 on: August 19, 2013, 04:44:21 AM »
Hi,

 I made an action a while ago to iterate back and forth.

http://hutonggames.com/playmakerforum/index.php?topic=2081.msg9151#msg9151

 So in your case, you would simply get the number of child using "get child count", then use that iterate action combine with get child. You can then get the next or previous and now where you are in the list.

Bye,

Jean