Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started 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!
-
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.
-
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
-
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.