playMaker

Author Topic: is there an action that does this?  (Read 2107 times)

strange_aeons

  • Junior Playmaker
  • **
  • Posts: 62
is there an action that does this?
« 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?

strange_aeons

  • Junior Playmaker
  • **
  • Posts: 62
Re: is there an action that does this?
« Reply #1 on: February 26, 2015, 10:51:56 PM »
or is it possible to use the Select Random String to point at variables?

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Re: is there an action that does this?
« Reply #2 on: February 28, 2015, 01:39:40 AM »
Check ArrayMaker, Get Random.
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

strange_aeons

  • Junior Playmaker
  • **
  • Posts: 62
Re: is there an action that does this?
« Reply #3 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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: is there an action that does this?
« Reply #4 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


strange_aeons

  • Junior Playmaker
  • **
  • Posts: 62
Re: is there an action that does this?
« Reply #5 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.