Rabbit 2600 Posted October 16, 2013 Share Posted October 16, 2013 I have a concept that I can't really figure out how to implement. The idea is that there is a cave composed of 15 rooms, and in these rooms there are 3 balls for the player to find. And I want the 3 balls to be randomly placed in any of the 15 rooms. And you have to find them. The balls are placed on the maps at the start of the game and won't change, so they stay there even if the player leaves the map without picking it up. The balls positions are only randomized when the game starts or when the level is finished. Any ideas how to go about this? Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted October 17, 2013 Share Posted October 17, 2013 This might help a little: http://atariage.com/forums/topic/171024-quick-yes-or-no-question-on-variable-arrays/ Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted October 18, 2013 Share Posted October 18, 2013 You could initialize a seed value for the ball placement at the start of the game. When you run the code to build up a scene you could also seed the rand function with your value and use that to determine ball placement. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.