Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: Tonda on August 30, 2018, 08:39:45 AM

Title: Arraymaker / Move Item to Last Index
Post by: Tonda on August 30, 2018, 08:39:45 AM
Hey all! I'm looking for something like this:

Moves an item in a Playmaker Array List proxy component to the last index slot.


----

I suppose I could use a combination of:

Array List Remove,
Array List Get Length,
Array List Insert

But I was surprised there were no Arraymaker actions that dealt specifically with the highest Index number.

Please advise if I should:

A) Hold out hope for a new action
B) Use the above 3 action solution
C) Some alternative better way to do this.

thanks!
Title: Re: Arraymaker / Move Item to Last Index
Post by: djaydino on August 30, 2018, 11:25:09 AM
Hi.

An 'array list move' action might be a good idea......

So i made one!
Can you try if it works well as i don't have a lot of time for testing :)

To place to the last index, set 'Index Move To' to -1
Title: Re: Arraymaker / Move Item to Last Index
Post by: Tonda on August 30, 2018, 03:13:19 PM
Awesome! Yeah that seems super useful!

So I gave it the full test work-through and it worked like a charm.

I was able to precede the action with 'Array List Contains' and store the index result of a specific item, and then use that variable with your Move action to put that variable in the last slot.

So that's exactly what i needed!
Title: Re: Arraymaker / Move Item to Last Index
Post by: jeanfabre on September 18, 2018, 09:38:30 AM
Hi,

 ok, the latest arrayMaker package features this action.

 Bye,

 Jean