+Gormare Posted February 22, 2015 Share Posted February 22, 2015 (edited) Hi! Thanks for the update of urwigo Im trying to dig deep into lua (Building my cartridge with Urwigo) For the moment ive building an cartridge for to be played anywhere. Ive got 8 zones and the cartridge work well. But i would like to build something like a memory game. So in these 8 zones I need to get 4x2 pictures (one picture in each zone). And then you have to pair the pictures..You get it? I know how to get them there by adding a picture for each zone in the inventory or in the zoneImage. But is there a way to add the pictures randomly? When starting the cartridge! Update: Im answering my own question Yes you can get a random picture function RandomPicture() local images={apple1,apple2,bananas3,bananas4} local r=math.random(table.getn(images)) Wherigo.MessageBox{Text="The fruit", Media=images[r]} end But how to get them into random zone ? Edited February 22, 2015 by Gormare Quote Link to comment
+charlenni Posted February 22, 2015 Share Posted February 22, 2015 (edited) local zones = {zone1, zone2, zone3, zone4 } local images = {image1, image2, image3, image4} for i = 1,#zones do local r = math.random(#zones) while images[r] == false do r = math.random(#zones) end zones[i].Media = images[r] images[r] = false end Don't use table.getn(), because not all systems has this implemented. It is a deprecated function in Lua 5.1. Edited February 22, 2015 by charlenni Quote Link to comment
+Gormare Posted February 22, 2015 Share Posted February 22, 2015 local zones = {zone1, zone2, zone3, zone4 } local images = {image1, image2, image3, image4} for i = 1,#zones do local r = math.random(#zones) while images[r] == false do r = math.random(#zones) end zones[i].Media = images[r] images[r] = false end Don't use table.getn(), because not all systems has this implemented. It is a deprecated function in Lua 5.1. Ty Charlenni :)works lika a charm :)I take the chance and ask one more question! Is there a way to do something similar and transferer items and images to the same zone? for ex I like the dragon to be seen in the zone and the player would have to option to pick it up!! Quote Link to comment
+charlenni Posted February 22, 2015 Share Posted February 22, 2015 (edited) local zones = {zone1, zone2, zone3, zone4 } local images = {image1, image2, image3, image4} local items = {item1, item2, item3, item4} for i = 1,#zones do local r = math.random(#zones) while images[r] == false do r = math.random(#zones) end zones[i].Media = images[r] items[r]:MoveTo(zones[i]) images[r] = false end You shouldn't ask this all in this thread. It has nothing to do with Urwigo Edited February 22, 2015 by charlenni Quote Link to comment
+Forest-Ghost Posted February 27, 2015 Share Posted February 27, 2015 How do I change the on proximity events in a zone in urwigo? Here's what I am trying to do: in zone "A" when the player enters they are given a message. They then leave this zone and re-enter. The second time around I do not want to show the same message again. How do I do this in Urwigo? Quote Link to comment
+laufkaefer Posted March 3, 2015 Share Posted March 3, 2015 How do I change the on proximity events in a zone in urwigo? Here's what I am trying to do: in zone "A" when the player enters they are given a message. They then leave this zone and re-enter. The second time around I do not want to show the same message again. How do I do this in Urwigo? You could use a variable to store the status of the zone, i.e. if status == 0, show message and set status = 1; if status == 1, do nothing Quote Link to comment
+Gormare Posted March 4, 2015 Share Posted March 4, 2015 Hi! I have a function like this below that takes a players input. Depending on input the variabel animal gets a new value and a new function are called. It works nice! But! here is a lot of animals around so insteed of doing theese if's I was thinking is it possible to do the same with a table/ arrays? function check_animal(input) local animal = input local key = string.sub(animal, 1, 3) if key == "dog" then animal = " You like the dog." dog() else if key == "cat" then animal = "You like the cat." cat() end end end Quote Link to comment
+Vooruit! Posted March 27, 2015 Share Posted March 27, 2015 It would be very nice to have support for OpenStreetMap. Bing Maps (and, previously, Google Maps) show mainly the paved roads, and for Wherigos, it's the little paths that are way more interesting. Quote Link to comment
+Tikkanen Posted April 12, 2015 Share Posted April 12, 2015 Hello. Im beginner for this. I need help for save the coordinates as same like complete code save. How i can do it for easyway. I have ready cartbridge but this feature missing. Ty! Quote Link to comment
+Forest-Ghost Posted April 13, 2015 Share Posted April 13, 2015 Hi Tikkanen, I sometimes store the coordinates as an item in the characters inventory. Another option is to put the coordinates in the zone description for the final zone and leave that zone active at the end of the Wherigo so that the player can always see that area. Here is a tutorial on how to add it as an item. Quote Link to comment
+Dani+Iris Posted April 27, 2015 Share Posted April 27, 2015 (edited) I developed a cartridge in Urwigo but after the initial success I want to translate it from my local / native language into other languages. What is the best way to do that in Urwigo? (When I now start a new cartridge and know that I want to translate it (from the beginning or later), I develop it in Earwigo as this has a built-in support for multi-language cartridges). Does anyone have an experience with this in Urwigo (and esp. with adding the multi-language support after the first single language version)? Options that come in mind: make copy cartridges (and thus multiple Wherigo.com listings) for the translationswhat about maintaining multiple versions and keeping them in sync? [*]keep one cartridge and introduce multiple languages techniques? Edited April 27, 2015 by Dani+Iris Quote Link to comment
+charlenni Posted April 27, 2015 Share Posted April 27, 2015 I created for the second case a quick and dirty solution for you. It is a module called Language, which has the following capabilities: - Translate all objects (name and descriptions) - Translate commands - Translate MessageBoxes and Dialogs with their buttons - Translate inputs - Translate multiple choice entries of inputs and convert it back before call of OnGetInput Who to use? Copy the code of the Lua Author Script (see attachment) to your project. The first in OnStart should be an input, where the user could select his/her language. Than init the language module with a call of "Language.Init(language_number, language_separator)". All texts should be set as "text in language 1##Text in language 2##Text in language 3" (in this example, language_separator is "##"). Than you could select with language_number of Init function, if you want the first, second or third part of the string (e.g. when language_number was 2, you get "Text in language 2" for the string. That's it. Tested it only on Emulator, so be carefull. If you encounter any problems, send a short message and I look into it. Best regards, Charlenni PS: It could be possible to use the UTF-8 GWZ file to have special characters on Garmins, but I didn't tested this. Quote Link to comment
+Nosynel Posted May 9, 2015 Share Posted May 9, 2015 I am hoping I can find a way to make my Urwigo work. I have created the zones, items, characters. I have tested it in the field twice. Once myself on my smartphone and once a friend tested it on a Garmin after I modified it. Both times it had faults. I really want it so that when you collect all the items you get the answer, the coordinates. I got the maps, zones and tasks and managed to collect some items but others didn't work. (I used the move to player option) But I couldn't make it dependant on actions. So I tried a different method. The map did not show on the Garmin. So it was impossible to test as the map didn't show. Please help Nellie Quote Link to comment
Ranger Fox Posted May 11, 2015 Share Posted May 11, 2015 So I tried a different method. The map did not show on the Garmin. So it was impossible to test as the map didn't show. The Garmin Wherigo Player does not plot things out on a map. It would have been nice, but none of the original Wherigo Player applications use maps. I really want it so that when you collect all the items you get the answer, the coordinates. (I used the move to player option) When you write the actions to give the player an item, you'll have to write a test to see if each item exists in the player's inventory. That might be a pain. I'd suggest, instead, to have a counter variable. Every time an item is added to the player's inventory, increment the counter. That makes it easier for you to write the subsequent test and also allows you to vary the number of items the cartridge uses while you're testing it (because you can also compare that counter against a variable containing the total number of items in the game. (If you were okay with writing author script, I'd just make a call to a function that would determine whether the player accomplished collecting all the items. That way your code isn't duplicated.) Quote Link to comment
+Noodles22 Posted June 9, 2015 Share Posted June 9, 2015 I have finally learned enough to make my first Wherigo using urwigo builder. I have a battle scene code written which resembles the RPG style, i.e. "player hits wolf, -7hp". But in both the emulator and in android the messages don't show up long enough to see, it just goes back to the attack menu. I tried using a dialog call which should require a click to continue, it didn't work. I thought the recursive input call I was using was at fault. Now I have a separate function call to handle the message, which calls up the attack input again. Yet the messages don't wait for a click to continue. How can I fix this? Also in a shop menu I have an if player contains item, message "you already have one" and no purchase is made. The message is skipped here also. What is going on? Quote Link to comment
+Dani+Iris Posted June 12, 2015 Share Posted June 12, 2015 I created for the second case a quick and dirty solution for you. It is a module called Language, which has the following capabilities: (...) Copy the code of the Lua Author Script (see attachment) to your project. Sorry for the late reply, but is it possible that I don't see the attachment? Quote Link to comment
+HxRoamer Posted July 29, 2015 Share Posted July 29, 2015 Another Newbie with a problem! Does anyone know why using 'CurrentZone.InventoryCount' causes a Lua runtime error? It reports "Attempt to get length of field 'inventory' (a nil value)". As I move into a zone I simply want to display the zone's name and the number of items in that zone's inventory. There is no problem if I display just the name. There are no errors detected in the Urwigo builder. Any help would be appreciated Regards Robert Quote Link to comment
+charlenni Posted July 31, 2015 Share Posted July 31, 2015 I would say, that you should use "Inventory" instead of "inventory". Perhaps your version of Urwigo has a problem in this function. To check this, save your cartridge as GWZ file and open it with a ZIP tool. Extract the Lua file and open it with a text edito. Search for the mentioned "inventory" and post this line of code. Quote Link to comment
+HxRoamer Posted July 31, 2015 Share Posted July 31, 2015 Hi Charlenni: Many thanks for your prompt assistance. I had managed to get the lua file into an editor but frankly it didn't mean too much to me particularly as all the strings need decoding. I have created a tiny cartridge in Urwigo with a single zone and a single On Entry event. I used the Urwigo builder to display three dialogs. The first displayed CurrentZone.Name, the second CurrentZone.Description and finally CurrentZone.Inventory Count. The event code is: function Zone1:OnEnter() _bnqDm = _DUs("\040\059\003\117\071") _Urwigo.OldDialog{ { Text = _G[_bnqDm].Name }, { Text = _G[_bnqDm].Description }, { Text = tostring(#_bnqDm.Inventory) } } end This will produce the runtime error. However if I remove the final InventoryCount dialog then the other two work perfectly. I tried removing the 'tostring' function and '#' sign but I couldn't re-load the lua into Urwigo to test it out. Kind regards Robert Quote Link to comment
+charlenni Posted July 31, 2015 Share Posted July 31, 2015 Thank you for the code. It seems, that this is a Urwigo bug. _bnqDm is a string, which hold the variable name of an object. _G[_bnqDm] is the object itself. Because of this, the first two dialogs work. But than _bnqDm.Inventory is called, but the string _bnqDm doesn't have such a field. That's way the cartridges crashes. Correct would be #_G[_bnqDm].Inventory for the number of items in the inventory. But be carefull, if you made this by yourself, because the variable name _bnqDm looks next time different. It's part of the obfuscation system of Urwigo. @Yourself: I assume, that this is a bug. Quote Link to comment
+HxRoamer Posted July 31, 2015 Share Posted July 31, 2015 Many thanks for your explanation. Perhaps one day I will get to understand a bit about lua. I assume there must be a Wherigo library somewhere but I can't find it. Quote Link to comment
+charlenni Posted July 31, 2015 Share Posted July 31, 2015 Players contain the Wherigo library. Quote Link to comment
+HxRoamer Posted July 31, 2015 Share Posted July 31, 2015 I was thinking more about the functions available and calling syntax but not really applicable to this thread. Quote Link to comment
+charlenni Posted July 31, 2015 Share Posted July 31, 2015 Take a look into the new Wiki from hosted by RangerFox. You can find the address in this forum. It is pinned, so it stays on top of the list. If you don't find something, than drop a note and I try to insert it. Quote Link to comment
+HxRoamer Posted July 31, 2015 Share Posted July 31, 2015 Thank you so much - that is exactly what I was looking for. Quote Link to comment
+sasolina Posted August 18, 2015 Share Posted August 18, 2015 Hi, Recently we have updated from Windows 7 to Windows 10, and since then we have a problem with urwigo, we can build cartdrige, but we can not run the cartdrige to test it. Someone else have this problem? Quote Link to comment
+sasolina Posted August 22, 2015 Share Posted August 22, 2015 Hi, Recently we have updated from Windows 7 to Windows 10, and since then we have a problem with urwigo, we can build cartdrige, but we can not run the cartdrige to test it. Someone else have this problem? We have already solved, the problem was the Windows 10 permits, putting the folder on the desktop the problem has been solved. Quote Link to comment
+Forest-Ghost Posted September 8, 2015 Share Posted September 8, 2015 (edited) Hi, Could some one explain how the "current objects" feature in urwigo works? If possible, a couple examples would be really helpful too. I have tried to use it a couple times but I realize now that I don't really understand what "current objects" is used for and I could not find any documentation on it. I was hoping to setup a command on an item that only effects the characters in the current zone the player is located in. Edited September 8, 2015 by Forest-Ghost Quote Link to comment
+Bremar Josrut Posted September 30, 2015 Share Posted September 30, 2015 I am trying to build my first cartridge. what I want to know is how to do the following: 1. I want to give the player a option of two or more choices, each option will have it's own consequence and action. How do I go about creating this? 2. Also I want a character in the game to be able to speak at different stages and say different things during these stages. How do I set this up? Thanks Quote Link to comment
+Maxinoha Posted September 30, 2015 Share Posted September 30, 2015 I am trying to build my first cartridge. what I want to know is how to do the following: 1. I want to give the player a option of two or more choices, each option will have it's own consequence and action. How do I go about creating this? 2. Also I want a character in the game to be able to speak at different stages and say different things during these stages. How do I set this up? Thanks Download this simple sample cartridge: http://www.urwigo.cz/vzorove-projekty/58-adventura-honzik-na-prazdninach Quote Link to comment
+Maxinoha Posted September 30, 2015 Share Posted September 30, 2015 Hi, Could some one explain how the "current objects" feature in urwigo works? If possible, a couple examples would be really helpful too. I have tried to use it a couple times but I realize now that I don't really understand what "current objects" is used for and I could not find any documentation on it. I was hoping to setup a command on an item that only effects the characters in the current zone the player is located in. Hello, documentation is here: http://www.urwigo.cz/navod/39-jdeme-na-to-s-urwigem-10-prace-s-objekty Quote Link to comment
+Bremar Josrut Posted September 30, 2015 Share Posted September 30, 2015 I am trying to build my first cartridge. what I want to know is how to do the following: 1. I want to give the player a option of two or more choices, each option will have it's own consequence and action. How do I go about creating this? 2. Also I want a character in the game to be able to speak at different stages and say different things during these stages. How do I set this up? Thanks Download this simple sample cartridge: http://www.urwigo.cz/vzorove-projekty/58-adventura-honzik-na-prazdninach Thanks for the link you don't by any chance have a English version? Quote Link to comment
+Bremar Josrut Posted October 1, 2015 Share Posted October 1, 2015 (edited) I am trying to build my first cartridge. what I want to know is how to do the following: 1. I want to give the player a option of two or more choices, each option will have it's own consequence and action. How do I go about creating this? 2. Also I want a character in the game to be able to speak at different stages and say different things during these stages. How do I set this up? Thanks Download this simple sample cartridge: http://www.urwigo.cz/vzorove-projekty/58-adventura-honzik-na-prazdninach Thanks for the link you don't by any chance have a English version? I've used Google translate, the translation is not perfect but it is helping me to get a better understanding of creating a cartridge. tHanks Edited October 1, 2015 by Bremar Josrut Quote Link to comment
+Forest-Ghost Posted October 1, 2015 Share Posted October 1, 2015 Check out tutorials for urwigo too. There are a whole series of them. I first learned urwigo through copying his code. A good way to learn is by practicing by looking at other urwigo cartridges. Another idea is to build a cartridge in Wherigo kit and then important into uriwgo. Kit makes it really easy to design a Wherigo and then after you important it in uriwgo you can see more of what is going on inside the cartridge. Also try practicing by building several of the tutorial cartridges (Groundspeak, Earwigo and of course the urwigo cartridges). Quote Link to comment
+Bremar Josrut Posted October 4, 2015 Share Posted October 4, 2015 Another 2 questions: How do I set the timer to record length of time player took to complete the cartridge? How do I get player to walk 100m to find a object that can be used later in the cartridge? Quote Link to comment
+Forest-Ghost Posted October 4, 2015 Share Posted October 4, 2015 (edited) Here is one example that has both. I created a nested zone that is only visible after entering the first zone. The item is moved to the character after exiting the nested zone. There is probably another way to do this but I could not figure it out. The Wherigo player tutorial has a function similar where you have to find an item 30 meters from your current location. For the timer I just created an interval timer that displays the game run time in seconds after entering the final zone. I don't know how to make it display in minutes. Here is the cartridge. I don't know why but Groundspeak doesn't let me upload attachments. Download the source file, rename it to .zip and you will find the urwigo file inside. Edited October 4, 2015 by Forest-Ghost Quote Link to comment
+Bremar Josrut Posted October 10, 2015 Share Posted October 10, 2015 When I want to test my cartridge to see if everything is working as I want it to I get a Timed Out Error. What must I do to correct this? Quote Link to comment
+Forest-Ghost Posted November 22, 2015 Share Posted November 22, 2015 I saw there was an update released for Urwigo. What all was changed? Quote Link to comment
+charlenni Posted November 22, 2015 Share Posted November 22, 2015 (edited) The main changes are the support of UTF-8. With this, it is possible to have special characters on all devices (including the emulator) except Garmins. With the (Garmin-UTF8 library, you can have them on Garmins too (not all, but all belonging to ISO 8859-1. So this release is mostly for Europeans . To use UTF-8, start or compile cartridges with the UTF-8 option and to upload the cartridge to www.Wherigo.com or www.wherigofoundation.com use the UTF-8 option too. I don't know, if there any additionally changes. Edited November 22, 2015 by charlenni Quote Link to comment
+Maxinoha Posted November 24, 2015 Share Posted November 24, 2015 (edited) UTF-8 support is not the only change. The main change is the choice of more maps. Edited November 24, 2015 by Maxinoha Quote Link to comment
+Blexa Posted November 24, 2015 Share Posted November 24, 2015 OSM = http://c.tile.openstreetmap.org/{z}/{x}/{y}.png MTB = http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png Google Map = http://mt1.google.com/vt/x={x}&y={y}&z={z} Google SAT s názvy = http://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z} Google SAT = http://khms0.google.com/kh/v=187&src=app&x={x}&y={y}&z={z} MAPY.CZ Základní = http://m1.mapserver.mapy.cz/base-m/{z}-{x}-{y} MAPY.CZ Foto = http://m1.mapserver.mapy.cz/ophoto-m/{z}-{x}-{y} MAPY.CZ Turist = http://m1.mapserver.mapy.cz/wturist-m/{z}-{x}-{y} MAPY.CZ CykloTur = http://m1.mapserver.mapy.cz/turist_trail_bike-m/{z}-{x}-{y} MAPY.CZ 2.VM = http://m1.mapserver.mapy.cz/army2-m/{z}-{x}-{y} Quote Link to comment
+ZenGuru Posted January 3, 2016 Share Posted January 3, 2016 I have an issue with the Urwigo emulator (or the Groundspeak emulator in Urwigo -- don't know what the relationship is). On my Windows 7 desktop it seems to work OK, but on my new Windows 10 laptop, the "tasks" on the main menu does not appear. Anybody else seen that issue? Quote Link to comment
+team weening Posted January 6, 2016 Share Posted January 6, 2016 i want to display and active a zone and a task by clicking a command in an item. but it says nothing available. can you help me. Quote Link to comment
+charlenni Posted January 6, 2016 Share Posted January 6, 2016 @ZenGuru: Did you check, if you could scroll down? Perhaps the window is to small, so that the tasks aren't fit on the screen. @Team Weening: It would be great to have a small demo cartridge to see, what you are doing. With no further information I have to guess. Perhaps you forgot to set the task and the zone active? Quote Link to comment
+Forest-Ghost Posted January 7, 2016 Share Posted January 7, 2016 (edited) I had a similar problem with the tasks not showing up for me awhile back. In the display settings there is an option to change text and or other items to larger or smaller. Make sure that this is set on "smaller 100%" and not 125% or anything higher. This will make the tasks disappear in urwigo. Edited January 7, 2016 by Forest-Ghost Quote Link to comment
+ZenGuru Posted January 9, 2016 Share Posted January 9, 2016 I had a similar problem with the tasks not showing up for me awhile back. In the display settings there is an option to change text and or other items to larger or smaller. Make sure that this is set on "smaller 100%" and not 125% or anything higher. This will make the tasks disappear in urwigo. You nailed it! Found the setting in Windows Display and changed it from what Bill Gates recommends (125%) to 100%. Now it looks the way it should. Quote Link to comment
+Pine and Poplar Posted January 11, 2016 Share Posted January 11, 2016 Is there a good instructional site on using the URWIGO builder? I tried following the tutorial on the download site for the program, but it seems like a lot of stuff I would like to be able to do is not covered. Quote Link to comment
+Dark-Wizard Posted February 1, 2016 Share Posted February 1, 2016 Is there a good instructional site on using the URWIGO builder? I tried following the tutorial on the download site for the program, but it seems like a lot of stuff I would like to be able to do is not covered. Have you tried looking on You Tube for Landon Smith. He has some great tutorials for Urwigo. Quote Link to comment
+Pine and Poplar Posted February 16, 2016 Share Posted February 16, 2016 Is there a good instructional site on using the URWIGO builder? I tried following the tutorial on the download site for the program, but it seems like a lot of stuff I would like to be able to do is not covered. Have you tried looking on You Tube for Landon Smith. He has some great tutorials for Urwigo. I think that's the one I found. After watching one of the video's everything made a lot more sense. Quote Link to comment
+Sothpaw Posted March 31, 2016 Share Posted March 31, 2016 The download link at the top of this page, for America, isn't working :-( any suggestions? 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.