playMaker

Author Topic: Find out what my Select Random Game Object Action selected[SOLVED]  (Read 2035 times)

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 126
    • Tumblr
Hi, I'm making a puzzle game. I'd like to have a next piece in a cue before the actual piece is spawned. Like in Tetris. I'm using, Select Random Game Object, then storing it as a variable. I'd need to show an image of it and not the actual piece. In order to do that, I'd need to know what piece the variable is storing. Any Action I could use to find out what piece it has stored in the variable from Select Random Object? Or any other ideas would be great, Thanks!
« Last Edit: April 17, 2014, 02:20:11 PM by jeanfabre »

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 126
    • Tumblr
I think I have an idea: Every piece will have an int with a designated number in an FSM. I'll get the int from the fsm on the variableGO that I stored from Random, then send it through an int switch. I should then know what piece my Random Action selected. Maybe this will work, I'll try it.
« Last Edit: April 02, 2014, 04:16:39 AM by Sarcophagav »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Find out what my Select Random Game Object Action selected
« Reply #2 on: April 03, 2014, 08:05:52 AM »
Hi,

 Maintain two arrays ( You know ArrayMaker right? )

-- one with the list of your pieces in 3d
-- one with the list of your pieces in 2d

then, you pick an random int, and go get the 3d or the 2d on them lists based on your needs.

Does that make sense?

bye,

 Jean

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 126
    • Tumblr
Re: Find out what my Select Random Game Object Action selected
« Reply #3 on: April 15, 2014, 03:46:54 PM »
Hi,

 Maintain two arrays ( You know ArrayMaker right? )

-- one with the list of your pieces in 3d
-- one with the list of your pieces in 2d

then, you pick an random int, and go get the 3d or the 2d on them lists based on your needs.

Does that make sense?

bye,

 Jean
Sorry for the late reply
It does; arrays are definitely the way to go thanks, Jean.