Playmaker Forum

PlayMaker News => General Discussion => Topic started by: EverySingleSoldier on September 29, 2021, 02:18:59 AM

Title: Arraymaker ,find/search a gameobject in the array using a partial string ?
Post by: EverySingleSoldier on September 29, 2021, 02:18:59 AM
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 ?
Title: Re: Arraymaker ,find/search a gameobject in the array using a partial string ?
Post by: djaydino 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.
Title: Re: Arraymaker ,find/search a gameobject in the array using a partial string ?
Post by: EverySingleSoldier on October 01, 2021, 01:49:17 AM
Thanks !