Random expression gone awry
Trendy
Member, PRO Posts: 6
I use the "random" expression to display random dominoes in my app. In the gamesald emulator this expression works perfectly. A random image of a domino displays for each individual domino in the scene for a particular challenge. When the game was published to the arcade instead of displaying one random domino for each individual domino in the scene, random images of all the dominoes seem to be cycling through each individual domino in the scene. (http://e.gamesalad.com/play/121646) Anyone have a clue as to why this is?
Comments
Post a screenshot of your rules. It doesn't help to see your game without knowing how you set it up.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
The app also works fine when installed on an android device.
Yes random behavior is buggy for me as well. I use spawn random (8,18) but it always spawns at 8 seconds, not randomly.
Are all the Dominoes present in the scene, pre-spawned? On the arcade it kind of looks like z-fighting to me. If so, that would be a renderer bug, and you would need to work around it by only spawning the domino you want.
@mariolouis That is not a bug with the random behavior which works consistently... that's an issue whereby a timer does not change its value once it has run once.
For that, you'll need a custom interval timer: http://forums.gamesalad.com/discussion/comment/464547/#Comment_464547
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang
I didn't know that. Thanks for the help! I really thought it was a bug. Been scratching my head for a long time. I've been doing work-arounds just to achieve that behavior.