Treasure Hunter G Posted July 8, 2013 Share Posted July 8, 2013 Is it possible to make a points system tied to individual characters? For example, I can make a character named "Todd". Without programming any commands, I can make it so that when you click on him in your inventory, a status screen appears that says "Todd has 0 apples". Every time I click on "Todd", it'll say he has 0 apples...Even after I trigger events in other zones that should give him more apples. I even checked the true value based on if/else triggers; basically I can't get the stated count listed under Todd.Description (in terms of lua function coding) to match the actual count. Any ideas on how to solve this problem? I'm thinking it might have something to do with metatables or OOP, (but any easier solutions, or at least simplified solution would be GREATLY APPRECIATED!!) Quote Link to comment
+cantuland Posted July 8, 2013 Share Posted July 8, 2013 I'm not quite sure what your question is. I also can't remember the exact formatting, but you could use something like TotalCount = TotalCount+1 Tom.description=[Tom found ] .. TotalCount .. [ apples.] Does that help at all? Quote Link to comment
Tyreless Posted July 8, 2013 Share Posted July 8, 2013 If you are using Urwigo to build your cartridges I have a solution for you. You create a variable called, say, "Todd's Apples". Every time Todd finds an apple you: 1. [increment] [Todd's Apples] +1; and 2. [set] Todd.Description = [concantenate] "Todd has " [Todd's Apples] " apples." Cheers, Geoff aka Tyreless Quote Link to comment
Geo-Magician Posted July 12, 2013 Share Posted July 12, 2013 ... I can make a character named "Todd". Without programming any commands,... Here is the Earwigo solution. No "real" programming required. Similar to the Urwigo example you need a variable that holds the current number of apples. I have named the variable Numeric. The Earwigo "secret" secret is that you can present the variable value (the current number of apples) if you enclose them name of the variable in ~~ characters. ...when you click on him in your inventory,... I suggest you use commands instead of the OnClick event (see example above). OnClick will crash Garmin devices. Earwigo will warn you if you attempt to use "critical" Wherigo functionality. If you want to have an additional screen that pops up after the increment, add a "Display Message" statement to the above example. Quote Link to comment
Treasure Hunter G Posted July 14, 2013 Author Share Posted July 14, 2013 Thanks all! I'm going to try these different methods and see what works! Wish me luck! 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.