playMaker

Author Topic: Array Remove ALl: Not removing anything?  (Read 726 times)

ViRiX Dreamcore

  • Playmaker Newbie
  • *
  • Posts: 34
Array Remove ALl: Not removing anything?
« on: June 10, 2021, 12:42:36 PM »
Hello,

I'm having this weird issue where I have items added to an array on a button press. But there is an "undo" feature in my game where they player can start over. The "undo" is basically removing all of the items from the array, but for some reason, the items stay in the array.

I've attached an image. The game is running, isn't the playerArray suppose to dhow as empty since it's being cleared out? 

If I run back through the loop after undoing, the previous item in the array stays and doesn't go away.

Am I doing something wrong?

I am using Array Add to add items, so I figured remove would remove items.

Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Array Remove ALl: Not removing anything?
« Reply #1 on: June 10, 2021, 04:26:28 PM »
Hi.
As far as i know it should remove whats inside the Elements but it will not remove the Elements itself.

you can use Array Resize (0)

ViRiX Dreamcore

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Array Remove ALl: Not removing anything?
« Reply #2 on: June 10, 2021, 11:03:44 PM »
Thanks for the reply.

Hm, I tried that, but it is still not working. It's almost as if it just ignores the commands and moves right passed the state.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Array Remove ALl: Not removing anything?
« Reply #3 on: June 11, 2021, 02:58:43 PM »
Hi.

Normally it can't just skip.

Check You fsm do you have global events on it?

What's in the state before that?

Try looking at it while playing.