playMaker

Author Topic: Arraylist problems with Sprites  (Read 1420 times)

frogwise

  • Playmaker Newbie
  • *
  • Posts: 49
Arraylist problems with Sprites
« on: August 11, 2021, 02:14:03 PM »
I am trying to solve this bug but cannot for the life of me figure out what I am doing wrong, and I think this may just be a code bug in the way arraylists handle sprites?

You can see here in the screenshot that I have a FSM checking an arraylist for a certain type of sprite, in this case, and octagon. If it finds it, it should go to GAME ON and if the sprite in question is not in the arraylist anymore, it should go GAME DONE.

Clearly here you can see the arraylist on the right still has many octagon sprites, yet the action is returning FALSE.

The weird thing is that sometimes it is correct, and sometimes it is not. Sometimes it will return TRUE correctly, and sometimes it will return FALSE incorrectly.

I have other FSMS setup in the exact same way for non-sprite arraylists, like colors, strings, etc, and they work just fine. The sprite arraylist does not, however.


frogwise

  • Playmaker Newbie
  • *
  • Posts: 49
Re: Arraylist problems with Sprites
« Reply #1 on: August 11, 2021, 02:16:08 PM »
And to further clarify, I have set the Object Type in the Array list Contains action to use Unity Engine > Sprite.

frogwise

  • Playmaker Newbie
  • *
  • Posts: 49
Re: Arraylist problems with Sprites
« Reply #2 on: August 15, 2021, 08:22:26 PM »
Bump.

Has no one experienced this? Are Sprite perhaps not being handled properly inside Arraylists?

frogwise

  • Playmaker Newbie
  • *
  • Posts: 49
Re: Arraylist problems with Sprites
« Reply #3 on: August 20, 2021, 10:45:03 PM »
Ok, I've  made a video of my game showing the setup and the problem. Hopefully this will get me some replies :)

https://www.dropbox.com/s/dj7cfdeu4zan93r/sprite_help.mp4?dl=0