+Leaky Spoon Posted February 23, 2011 Share Posted February 23, 2011 (edited) I'm creating a cart where all the zones start out as active. Upon leaving each one, they are then moved to inactive. I want the player to be able to go to any zone in any order, but when they get all the zones finished, I want it to show the final zone. Is this a command? How would that expression look? HELP! I am using Urwigo, if it helps Edited February 23, 2011 by Leaky Spoon Quote Link to comment
+Tequila Posted February 23, 2011 Share Posted February 23, 2011 There may be more elegant ways but I would set out an Active_Zone_Ctr, initialized to the number of active zones at the start. As you exit each zone, and turn it inactive, decrement the counter by 1. Then do a test on the value of the counter. If it equals 0, you know all the zones have been visited. Quote Link to comment
+Leaky Spoon Posted February 23, 2011 Author Share Posted February 23, 2011 Thanks, Tequila. That does sound like it would work and I understood every single word you wrote...that said, I'm not sure where to put the Active_Zone_CTR and how to actually implement your suggestion. This building thing is a struggle and I've dumbed down my concept quite a bit I see the end in sight, but I'm getting more and more confused! Can you explain where it would go? Quote Link to comment
+Tequila Posted February 23, 2011 Share Posted February 23, 2011 I would code as follows: (English, not LUA) Set Zone1 to Inactive Set Active_Zone_ctr = Active_Zone_Ctr - 1 If Active_Zone_Ctr = 0 then set Final_Zone to Active. Quote Link to comment
+Leaky Spoon Posted February 23, 2011 Author Share Posted February 23, 2011 Thanks. I'll give it a whirl Quote Link to comment
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.