playMaker

Author Topic: [Bug?] with "Array Get Next" action  (Read 3589 times)

Graham

  • Sr. Member
  • ****
  • Posts: 333
  • I Love Playmaker!
    • Portfolio
[Bug?] with "Array Get Next" action
« on: June 07, 2017, 03:43:07 PM »
The "Array Get Next" action appears to have a very frustrating quirk. It doesn't appear to iterate through the whole array every time it is passed.

In the attached example scene you can see the issue very clearly. Pressing the left mouse button will compare arrayA to arrayB. For now arrayA has only the int value of "5" in it, while arrayB has int values from 0 though 9. It should find the 5 every time in arrayB, however it only finds it every second search. If you add a second value to arrayA, it will only fail every third try etc.

Thanks for looking at this!
« Last Edit: June 07, 2017, 04:16:01 PM by Graham »
More templates on the Unity Asset Store!

Disclosure: We are using affiliate links to our assets; we may receive a commission for purchases made through them. This helps us to continue developing and maintaining great products!

Graham

  • Sr. Member
  • ****
  • Posts: 333
  • I Love Playmaker!
    • Portfolio
Re: [BUG] with "Array Get Next" action
« Reply #1 on: June 07, 2017, 04:15:46 PM »
It appears to only be an issue if the action was interrupted. I worked around this by letting it iterate through the entire array every time and just registering a bool and testing it after the comparison is done.
More templates on the Unity Asset Store!

Disclosure: We are using affiliate links to our assets; we may receive a commission for purchases made through them. This helps us to continue developing and maintaining great products!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [Bug?] with "Array Get Next" action
« Reply #2 on: June 16, 2017, 09:16:22 AM »
Hi,

 yes, this action doesn't have a reset flag so you indeed need to let to loop till the end.

 However you may simply want to use the iterate action and increment an index that you then use to get data from the array, it's really quick to develop and prevents wasting processing cycles for nothing by iterating to the end when not necessary.

 Bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: [Bug?] with "Array Get Next" action
« Reply #3 on: June 17, 2017, 02:07:57 AM »
Hi,
Or you can get 'Array Get Next2' on the Ecosystem
This one has a "Reset Flag" :D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [Bug?] with "Array Get Next" action
« Reply #4 on: June 19, 2017, 05:20:58 AM »
Hi,

 d'oh, forgot about that version :)  thanks Djaydino!

Bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: [Bug?] with "Array Get Next" action
« Reply #5 on: June 19, 2017, 08:58:09 AM »
Hi,

Hehe, np.

There are a lot of custom actions now so it is getting hard to remember them all ;)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [Bug?] with "Array Get Next" action
« Reply #6 on: June 29, 2017, 02:38:21 AM »
Hi,

 Yep, I am not sure how to handle this actually, I think adding more keywords in actions so that it's easier to find them is a good step, but even on the Asset store, it becomes impossible to know exactly if the system you are looking for exists already or not....

 Bye,

 Jean

Bye,

 Jean