playMaker

Author Topic: Array List Contains Count  (Read 7643 times)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Array List Contains Count
« 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.
« Last Edit: May 05, 2015, 02:27:43 PM by dudebxl »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Array List Contains Count
« Reply #1 on: April 01, 2015, 10:08:43 AM »
Hi,

 nice!! I'll add it to the package.

 Bye,

 Jean

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Array List Contains Count
« Reply #2 on: April 01, 2015, 11:40:38 AM »
Thanks for putting this, I may add this in the next array tutorial
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Array List Contains Count
« Reply #3 on: April 01, 2015, 12:45:09 PM »
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..
« Last Edit: April 01, 2015, 12:50:10 PM by dudebxl »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Array List Contains Count
« Reply #4 on: April 03, 2015, 02:25:56 AM »
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

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 219
Re: Array List Contains Count
« Reply #5 on: April 04, 2015, 09:53:09 PM »
1.8 playmaker.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Array List Contains Count
« Reply #6 on: April 14, 2015, 08:41:47 PM »
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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Array List Contains Count
« Reply #7 on: April 27, 2015, 03:28:26 AM »
Hi,

 I have put that action on the Ecosystem 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

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Array List Contains Count
« Reply #8 on: May 05, 2015, 02:15:24 PM »
Update bump

CrispyArrow

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Array List Contains Count
« Reply #9 on: December 18, 2015, 09:15:36 AM »
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?

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Array List Contains Count
« Reply #10 on: December 18, 2015, 09:23:14 AM »
@CrispyArrow

Have you downloaded the arraymaker from ecosystem or wiki?

CrispyArrow

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Array List Contains Count
« Reply #11 on: December 18, 2015, 10:08:42 AM »
@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 :)
« Last Edit: December 18, 2015, 10:12:20 AM by CrispyArrow »