playMaker

Author Topic: Arraymaker ,find/search a gameobject in the array using a partial string ?  (Read 207 times)

EverySingleSoldier

  • Playmaker Newbie
  • *
  • Posts: 20
I am using the gameobject name to store some information, so the first 6 digits are the unique gameobject's name, followed by a few digits that can be modified in game.

With Arraymaker, is there a way to find the gameobject by searching for it in the array using the partial string (first 6 digits), so  something like 'Array List Contains' or is it the same as me just iterating through the array and physically taking the string left 6 and doing a comparison ?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6484
    • jinxtergames
Re: Arraymaker ,find/search a gameobject in the array using a partial string ?
« Reply #1 on: September 29, 2021, 10:31:00 AM »
Hi.
you can set 2 (or more) array lists when population the list.

array list 1 : string and contains the name
array list 2 : game objects that contains the game objects

when you set the string names you could already strip them before placing in the lists so when you use Array List Contains you can search for that part only.
and store the index.
with that index you can use Array List Get to get the game object.

This way you can also make even more arrays with other data if needed.
and you can search by Game object or by name.
Ecosystem might not work at the moment
here are direct Github Links to the custom actions :
https://github.com/PlayMakerEcosystem
https://github.com/jeanfabre


Join the PlayMaker Discord Channel!

EverySingleSoldier

  • Playmaker Newbie
  • *
  • Posts: 20
Thanks !