Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: edufurla on September 24, 2018, 11:23:16 AM

Title: Get List Values
Post by: edufurla on September 24, 2018, 11:23:16 AM
I don`t know if this is an advanced or noob topic, but someone knows how to get values from a list in the inspector tab.
Something like getting the size of the list (easy with "get property") and populate an array inside playmaker.
Is there a universal way that works with all kinds of lists (like materials, floats, gameobjects, etc..) or each case needs to be set up in its own way or by custom scripts?
Title: Re: Get List Values
Post by: djaydino on September 25, 2018, 03:05:16 AM
Hi.
Is the script from a 3rd party asset?
Maybe there are some (dedicated) custom actions for it.

If not but you have some c# skills it is always best to communicate directly with the script with some custom actions or set some fsm variables directly from the script.
Title: Re: Get List Values
Post by: edufurla on September 25, 2018, 04:46:29 AM
Thanks for your reply djaydino.
It is an old script with from a plugin with no Playmaker support.
I have no c# skills but I need to start sometime  :-\
Seems the second option can be less challenging to do. Do you have any scripts examples of how to set FSM variables from scripts that you can share?

Title: Re: Get List Values
Post by: djaydino on September 25, 2018, 07:09:35 AM
Hi,
Usually most assets have methods and or properties that are easy to implement.
From what assets is it?

You can check the api reference from playmaker (https://hutonggames.fogbugz.com/default.asp?W127) to check how you can communicate,
but you probably won't understand much on how to implement it to a script.

Probably you should look to Accessing Scripts in a Custom Action (https://hutonggames.fogbugz.com/default.asp?W540)
But if it is a list you probably need to change it to an array also.

If the script/asset is not licence per seat you can send me the script and i can have a look
Title: Re: Get List Values
Post by: edufurla on September 26, 2018, 04:38:49 AM
Thanks djaydino.
I will take a look on that.