playMaker

Author Topic: ArrayMaker sort alphabetically by name[SOLVED]  (Read 1752 times)

escpodgames

  • Hero Member
  • *****
  • Posts: 686
    • View Profile
    • Assets
ArrayMaker sort alphabetically by name[SOLVED]
« on: February 13, 2013, 05:28:39 PM »
Hi,

I need to sort an array list alphabetically, the Array list sort action only works with strings from what I can tell.

On game startup I add a bunch of positions to an array, these positions are taken from existing game object. Everything works as expected except the order of the positions eg,
position_03
position_01
position_04
position_02

I did found an old thread - http://hutonggames.com/playmakerforum/index.php?topic=2381.0

Any word on this jean?
« Last Edit: July 24, 2018, 01:09:36 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14237
  • Official Playmaker Support
    • View Profile
Re: ArrayMaker sort alphabetically by name
« Reply #1 on: February 15, 2013, 12:32:48 AM »
Hi,

 I am not sure what to do cause I can't seem to find a working sample on the net to give me some hints as how to do it.

 I would suggest you save the gameObjects names and then sort them. Would that not work?

bye,

 Jean

escpodgames

  • Hero Member
  • *****
  • Posts: 686
    • View Profile
    • Assets
Re: ArrayMaker sort alphabetically by name
« Reply #2 on: February 17, 2013, 07:23:25 PM »
I think ill just manually add the positions to the array, not ideal but at least it will work.

Thanks anyways Jean :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14237
  • Official Playmaker Support
    • View Profile
Re: ArrayMaker sort alphabetically by name
« Reply #3 on: February 17, 2013, 10:46:35 PM »
Hi,

 is it something you don't have to do at run time?

bye,

 Jean

escpodgames

  • Hero Member
  • *****
  • Posts: 686
    • View Profile
    • Assets
Re: ArrayMaker sort alphabetically by name
« Reply #4 on: February 17, 2013, 11:23:08 PM »
It doesn't have to be done at runtime but would make it a lot easier as each level would have a different amount of items in the array.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14237
  • Official Playmaker Support
    • View Profile
Re: ArrayMaker sort alphabetically by name
« Reply #5 on: July 24, 2018, 01:09:25 AM »
Hi,

 ok, the original thread now has a working action for this:

http://hutonggames.com/playmakerforum/index.php?topic=2381.msg10563#msg10563

 Bye,

 Jean