playMaker

Author Topic: Show array list  (Read 4704 times)

Tomasz

  • Playmaker Newbie
  • *
  • Posts: 34
Show array list
« on: May 01, 2017, 03:18:23 PM »
Hi folks!
I need to print array content on game screen.

To show content from integer I use GUI Layout Int Label action.
Maybe there is something similar to list the array?

Tomasz

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Show array list
« Reply #1 on: May 04, 2017, 08:56:57 AM »
I found a solution to this problem, but I encountered an error.

I thought:
First I will convert string from array to integer,
and then I will be able to view it using the "GUI Layot Int Label" action.

Unfortunately I have not found an array to an int convert action.
That is why I first used the action: Array List Built Int to String Fast.
Next: Convert String to Int.

But I have an error in the last one action:
FormatException: Input string was not in the correct format.

Look at my print screen please.
What did I do wrong?

I know it looks strange, but I can not display the array content on game screen, so I write it to a global variable and convert first.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Show array list
« Reply #2 on: May 04, 2017, 09:17:57 AM »
Hi,
You might want to use Ugui instead of the old gui system.
You can get the actions on the Ecosystem.
Look for "ugui proxy full" and get it in your project

Then you can make a gameobject/ui/text and you can use the action 'ugui text set text'

So you only need the 1st action and the 'ugui text set text' action to display it on the screen

Tomasz

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Show array list
« Reply #3 on: May 04, 2017, 02:26:10 PM »
Thanks for the help,
I wanted to install "Ugui proxy full" but the system displays some errors and does not install the action.
I attach a print screen.
I do not know what's going on.

Crap, I'm a little bit broken,
I was just about to simple display the array content on the game screen, but there are such a problems...

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Show array list
« Reply #4 on: May 04, 2017, 03:02:12 PM »
Hi, the yellow ones are warnings, they do not harm anything.
They are just saying that on a later version of unity (maybe 6 or 7) certain command will not be used anymore, by then these actions will be updated.

Try searching ugui in your action window, they should be there.

Tomasz

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Show array list
« Reply #5 on: May 05, 2017, 02:58:11 AM »
Thanks! I took a step forward :-)
I made gameobject/ui/text and add the actions:
1. 'array list built int to string fast' in which I store result in global variable
2. than 'ugui text set text' action prints text from that variable.

And in canvas I have picked my render camera.
Now a strange thing happened - I see the status names of individual FSM :-D

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Show array list
« Reply #6 on: May 05, 2017, 03:18:07 AM »
Hi,
I think that is the playmaker debugging state labels.

In the Hierarchy select PlayMakerGUI and in the inspector you can uncheck them in the Debugging part.

These are mainly helpful if you make a build on a device so you can see if states are working. :)

Tomasz

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Show array list
« Reply #7 on: May 05, 2017, 04:02:54 AM »
Thanks, I turned off showing the labels and they disappeared :-)
But I didn't see the array.
I have one array only.
I even inserted the add action to my text object for testing.
But nothing helped.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Show array list
« Reply #8 on: May 05, 2017, 05:42:15 AM »
Hi,
Can you turn on debug mode like on the picture, then press play and see if there is something in the "store result".



Tomasz

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Show array list
« Reply #9 on: May 05, 2017, 06:00:47 AM »
Done, result in print screen.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Show array list
« Reply #10 on: May 05, 2017, 06:49:50 PM »
hmm, i think you are mixing up 2 different array systems

'array' are the standard that come with playmaker,
'array list' is a more advanced array system made by jean.
you can not read the standard arrays directly with array maker actions

on the user tutorial wiki page you can find some tutorials for both array maker and pm standard arrays :)

Tomasz

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Show array list
« Reply #11 on: May 06, 2017, 11:03:25 AM »
Many many thanks Djaydino!
I'm going for testing,
and I saw your tutorials with arrays!
This will be a nice weekend learning :-)