Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Sly on September 15, 2015, 02:21:59 PM

Title: Array Maker: Remove Null or empty value
Post by: Sly on September 15, 2015, 02:21:59 PM
Hello,

I'm just wondering if it's possible to actually remove only empty or NULL value from an array list?

I know it's possible to do it one by one, but I'm not sure if there is a way to remove all Null or empty item in same time. Does it exist an action for that?
If not, Do you think it should be hard to do one?
Title: Re: Array Maker: Remove Null or empty value
Post by: mdotstrange on September 15, 2015, 07:28:42 PM
You could use a game object compare to compare an array element and delete it if = null perhaps?

The only action close that that I've seen is this one http://hutonggames.com/playmakerforum/index.php?topic=10190.0 but it deletes duplicates instead of nulls
Title: Re: Array Maker: Remove Null or empty value
Post by: Sly on September 16, 2015, 02:55:13 PM
Yes I can use compare but it's tricky to do it this way, because I need to check each entry one by one, and if it remove element the index will be messed...

That's basically why It could be cool to have one action removing each null entry.
I think I will need an action working like the duplicate one but with the null value.
Probably someone can do it. I will take a look but I'm not the best in this field.
I'll let you know.