Playmaker Forum
PlayMaker Updates & Downloads => Share New Actions => Topic started by: dudebxl on March 31, 2015, 07:06:18 PM
-
Hi,
I need to count how many x in y array. Could not find action so here we go.. this is more of a hack then a 'real' array action. Could also be used to identify duplicates (guerrilla style) if you already know the data going into array. Count how many 2's in array, if above 1 then you have a duplicate.
Still in beta; only tested with int, string & float so if you have any issues pm me.
Update Note: Added missing elements: Gameobject, Texture, Material & Audio(select Object for audio). Forgot to add these elements sorry lol
Update Note: Due to an adhoc bug (not 'capturing' the inputted variable[]), new action attached. This action was fully re-written. The count compare method is different vs previous action.
Hope it helps someone as I really need this action.. any issues pm me.
-
Hi,
nice!! I'll add it to the package.
Bye,
Jean
-
Thanks for putting this, I may add this in the next array tutorial
-
Hi,
Great (to both of you), please do ;)
... but please test well before anything. I have not had time to test well this action (except int, float,etc).. please post here if all is well with action (sorry no time for the moment to do a full on test, will do at a later date) so that i can change the beta status.
Many thanks..
-
Hi,
yes, I am currently doing lots of tests, but unfortunatly, arrayMaker package would be better off waiting for 1.8 to come out. so let's see.
Bye,
Jean
-
1.8 playmaker.
-
FYI,
small bug (maybe): on rare occasions (of course in my project all the time but in tests projects never + unable to reproduce bug), the action does not make a count as the variable[] is set to 0. It is not 'capturing' the inputted variable[] in the switch (variable[] contains data - i see it in the action debug but in debug.log the value is 0). This happens on a adhoc basis. root cause: unknown??
If anybody knows, please let me know.. so that i can update this action.. many thanks as i am out of ideas..
Use this action at your own risk..
Action updated
-
Hi,
I have put that action on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) via Snipt. this will be easier for users to consume your actions:
https://snipt.net/jeanfabre/
To get them from the Ecosystem, browse as usual.
Bye,
Jean
-
Update bump
-
I've tried the script, but it can't find the namespace "ArrayListActions" nor can it find anything called "PlayMakerArrayListProxy"
Is there a specific folder in which I was supposed to put this?
-
@CrispyArrow
Have you downloaded the arraymaker from ecosystem or wiki?
-
@dudebxl
I downloaded it directly from this forum post
I'm downloading the one from ecosystem right now. If I don't reply anymore, it means that it works :)