playMaker

Author Topic: Array Maker: Remove Null or empty value  (Read 2904 times)

Sly

  • Full Member
  • ***
  • Posts: 123
Array Maker: Remove Null or empty value
« 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?

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Array Maker: Remove Null or empty value
« Reply #1 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
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Sly

  • Full Member
  • ***
  • Posts: 123
Re: Array Maker: Remove Null or empty value
« Reply #2 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.