Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: strange_aeons on February 26, 2015, 10:46:27 PM

Title: is there an action that does this?
Post by: strange_aeons on February 26, 2015, 10:46:27 PM
I have been wondering if there is a action that randomly selects a variable from a predefined list of variables, similar to the Select Random String action and stores the result for use later on?
Title: Re: is there an action that does this?
Post by: strange_aeons on February 26, 2015, 10:51:56 PM
or is it possible to use the Select Random String to point at variables?
Title: Re: is there an action that does this?
Post by: Phuzz on February 28, 2015, 01:39:40 AM
Check ArrayMaker, Get Random.
Title: Re: is there an action that does this?
Post by: strange_aeons on March 01, 2015, 08:35:28 PM
ok, i have no idea how to go about using that, how do i setup and use an array? ive tried to make sense of the examples and i just dont understand what is happening.
Title: Re: is there an action that does this?
Post by: jeanfabre on March 02, 2015, 12:36:56 AM
Hi,

 you start by adding an ArrayList or HashTable component to your gameobject,
1: select a gameObject
2: add component via the menu PlayMaker/Addons/ArrayMaker/Add xxx proxy to gameobject.

in your case I think you can go with an ArrayList.

fill in data ( select the type, and the amount of items, and then populate them).

 At runtime, you have a whole set of actions to get, get random set, delete, find, items in arrayLists.

Bye,

 Jean

Title: Re: is there an action that does this?
Post by: strange_aeons on March 02, 2015, 03:03:47 AM
thank you, i hadn't noticed the component side of things. i will play around with this and see what happens.