playMaker

Author Topic: Get Next Child does not get the right number of children?  (Read 125 times)

PolyMad

  • Hero Member
  • *****
  • Posts: 502
Get Next Child does not get the right number of children?
« on: September 08, 2021, 11:12:46 AM »
As you can see in the video, using the integrated action Get Next Child does not seem to be working correctly.


Get Child Count though is working correctly, so I reverted to Get Random Child and Get Child Count at every cycle for this.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6474
    • jinxtergames
Re: Get Next Child does not get the right number of children?
« Reply #1 on: September 08, 2021, 02:17:16 PM »
Hi.
I believe that get next child is working, BUT since you are destroying the children the index will get messed up.

you could use a Array List and add the objects when you spawn and then use Array List Get Next and destroy.
once all destroy, do a array list clear.
Ecosystem might not work at the moment
here are direct Github Links to the custom actions :
https://github.com/PlayMakerEcosystem
https://github.com/jeanfabre


Join the PlayMaker Discord Channel!

PolyMad

  • Hero Member
  • *****
  • Posts: 502
Re: Get Next Child does not get the right number of children?
« Reply #2 on: September 08, 2021, 04:45:45 PM »
Well for now I solved, for the next time I'll see if re-getting the count each time will work.