Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: Graham on June 07, 2017, 03:43:07 PM

Title: [Bug?] with "Array Get Next" action
Post by: Graham 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!
Title: Re: [BUG] with "Array Get Next" action
Post by: Graham 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.
Title: Re: [Bug?] with "Array Get Next" action
Post by: jeanfabre 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
Title: Re: [Bug?] with "Array Get Next" action
Post by: djaydino on June 17, 2017, 02:07:57 AM
Hi,
Or you can get 'Array Get Next2' on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)
This one has a "Reset Flag" :D
Title: Re: [Bug?] with "Array Get Next" action
Post by: jeanfabre on June 19, 2017, 05:20:58 AM
Hi,

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

Bye,

 Jean
Title: Re: [Bug?] with "Array Get Next" action
Post by: djaydino 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 ;)
Title: Re: [Bug?] with "Array Get Next" action
Post by: jeanfabre 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