Peter G Posted October 1, 2013 Share Posted October 1, 2013 One of the tricks I picked up while coding in C++ was putting "monitors" on the screen (my term). They simply showed the value a variable held, making it easier to see what the program logic was doing behind the scenes. So you can guess how thrilled I was to find out the score display could be used to do just that. I'm at a point where I'm trying to incorporate random number generation to determine if the NPC on the screen is friend or foe. In the global declaration area, I put: dim rand16 = z Inside the main loop, I put: score = rand When I run the game, the score ALWAYS says 74. It never changes. So I'm clearly doing something wrong. How do I make it select a random number every time the program gets to where it assigns the value? What am I missing? Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted October 1, 2013 Share Posted October 1, 2013 Don't use score = rand, use this instead: http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#testvariables Then use temp4 = rand. 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.