Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Gav (HeyBud) on April 02, 2014, 03:55:56 AM

Title: Find out what my Select Random Game Object Action selected[SOLVED]
Post by: Gav (HeyBud) on April 02, 2014, 03:55:56 AM
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!
Title: Re: How to make a puzzle piece show up early as "Next Piece" Like in Tetris?
Post by: Gav (HeyBud) on April 02, 2014, 04:14:53 AM
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.
Title: Re: Find out what my Select Random Game Object Action selected
Post by: jeanfabre 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
Title: Re: Find out what my Select Random Game Object Action selected
Post by: Gav (HeyBud) 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.