+bflentje Posted June 1, 2015 Posted June 1, 2015 I've searched around and got close but it is unclear to me how to Set the value of distance to zone into a variable object. Can someone please lead me down the correct path? And what is the relationship between variables and expressions? While I understand the fundamental idea of functions and expressions since I am a programmer (in another language) but there must be a disconnect somewhere in the Earwigo tool that I am trying to use. Basically trying to create the classic warmer colder game, which is out there in other areas. But to determine actual warmer or colder I need to know what the "last" reading was in order to do a compare. Quote
+bflentje Posted June 2, 2015 Author Posted June 2, 2015 (edited) Anyone here besides me? Bueller? Bueller? Edited June 2, 2015 by bflentje Quote
+charlenni Posted June 5, 2015 Posted June 5, 2015 Sorry for the late answer. To get the distance from your actual position to y zone, you could use local d,b = Wherigo.VectorToZone(Player.ObjectLocation, zoneObj) d is the distance, b is the bearing from Player ObjectLocation to zone zoneObj. Expressions are comparisons between variables or variables and values. Earwigo needs this, because it uses this expressions to create the if statements. To do the warmer/colder game, use a global variable (created by Earwigo), which holds the last distance. Compare than this variable with the new value. Quote
+bflentje Posted June 5, 2015 Author Posted June 5, 2015 Sorry for the late answer. To get the distance from your actual position to y zone, you could use local d,b = Wherigo.VectorToZone(Player.ObjectLocation, zoneObj) d is the distance, b is the bearing from Player ObjectLocation to zone zoneObj. Expressions are comparisons between variables or variables and values. Earwigo needs this, because it uses this expressions to create the if statements. To do the warmer/colder game, use a global variable (created by Earwigo), which holds the last distance. Compare than this variable with the new value. Thanks. But how do I implement that code to assign distance to my variable? Everything about building Wherigo makes sense to me except in how to use custom code and where I interact with it. Quote
+charlenni Posted June 5, 2015 Posted June 5, 2015 I created a test cartridge, so that you could see, what's going on. Find the Backup file attached. cartColdWarmGame.txt Quote
+bflentje Posted June 5, 2015 Author Posted June 5, 2015 I created a test cartridge, so that you could see, what's going on. Find the Backup file attached. Sweet. Thank you. Taking a look at it now. Quote
+bflentje Posted June 5, 2015 Author Posted June 5, 2015 I created a test cartridge, so that you could see, what's going on. Find the Backup file attached. Have to find another builder. I've been using the online EarWigo tool.. which I don't see a way to send up code. Quote
+charlenni Posted June 6, 2015 Posted June 6, 2015 Sorry, that I don't provide a instruction, how to restore the backup file. Go to Earwigos "Manage cartridges" page and select "Restore" in the "Operation" combo box. Than use "Select file to upload" button to specify, which backup file you want to restore. Than use button "Submit" to start the restore process. That's it. But be carefull. This only works, if you don't reached your maximum number of allowed cartridges. If you allready have 5 cartridges, than you don't see "Restore" in the "Operation" section Quote
+bflentje Posted June 6, 2015 Author Posted June 6, 2015 Sorry, that I don't provide a instruction, how to restore the backup file. Go to Earwigos "Manage cartridges" page and select "Restore" in the "Operation" combo box. Than use "Select file to upload" button to specify, which backup file you want to restore. Than use button "Submit" to start the restore process. That's it. But be carefull. This only works, if you don't reached your maximum number of allowed cartridges. If you allready have 5 cartridges, than you don't see "Restore" in the "Operation" section I think this is exactly my problem. I have exactly five carts in Earwigo. Thanks for pointing out my dunderhead move. Good thing is that one is just a junk cart and can be deleted. Will take a look at it again today. You have no idea how much I appreciate the help. Quote
Geo-Magician Posted June 7, 2015 Posted June 7, 2015 I think this is exactly my problem. I have exactly five carts in Earwigo. Thanks for pointing out my dunderhead move. Good thing is that one is just a junk cart and can be deleted. Will take a look at it again today. If it is real junk, deletion is the way to go. In general bfore you delete a cartridge, consider to backup all old finished cartridges (ManageCartridges/Backup) to your home computer to free up space. Once they are stored on your home PC delete them on Earwigo. Quote
+bflentje Posted June 9, 2015 Author Posted June 9, 2015 Sorry, that I don't provide a instruction, how to restore the backup file. Go to Earwigos "Manage cartridges" page and select "Restore" in the "Operation" combo box. Than use "Select file to upload" button to specify, which backup file you want to restore. Than use button "Submit" to start the restore process. That's it. But be carefull. This only works, if you don't reached your maximum number of allowed cartridges. If you allready have 5 cartridges, than you don't see "Restore" in the "Operation" section Ok, now that daughter's graduation is over with from the weekend, finally had time to come look at this again. I did manage to get it into Earwigo. Thanks for pointing out the errors of my ways. I see most of the logic is in the timer. I am going to spend some time studying it and seeing how it runs. I suspect I'll have a couple of questions but thank you again so much for getting me to this point. Quote
Geo-Magician Posted June 10, 2015 Posted June 10, 2015 I see most of the logic is in the timer. I am going to spend some time studying it and seeing how it runs. I suspect I'll have a couple of questions but thank you again so much for getting me to this point. http://earwigo.net/WWB/wiki/doku.php?id=timers this link to timer functionality in the Earwigo wiki might help to get you started with timers. The naming of the events and timers is somewhat confusing. Have a look ;-) Quote
+bflentje Posted June 23, 2015 Author Posted June 23, 2015 Hmm, strange. Struggling with the distance logic. Not sure if it's a timer firing issue or if I botched it up when modifying the zone to be in my area. Quote
+Lost-Wolf Posted October 14, 2018 Posted October 14, 2018 sorry for using this old topic, but is it possible to display the distance to the zone (in m) in a message? Quote
+jonny65 Posted October 15, 2018 Posted October 15, 2018 Thats easy .. see the pic below ... the numeric operation (value * 1) rounded with 0 decimal places is for better readability ... 172 m instead of 172.74623457823m But better than a message is to change the description of an item with a timer, so you have continuous values each n seconds (depending on timer duration) ... 172m....169m....163m .... Example in the testsuite under timer "Checkposition". EN : http://www.Wherigo.com/cartridge/details.aspx?CGUID=676f945a-4fb0-43da-b6d4-fc192757cb7a DE : http://www.Wherigo.com/cartridge/details.aspx?CGUID=9ae24abd-7e18-466f-99f8-97899f3d95e0 Quote
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.