Jump to content

URWIGO builder


yourself

Recommended Posts

Last update I guess: I dug out my old laptop and tried it there - and everything works as it should. There's something wrong with my computer that won't let me use Urwigo properly but I have no idea what. The Urwigo website only mentions .net framework 3.5 as requirement, and I checked that one.

 

This error seems to be somehow related to something within the zones, but I can't figure out what. Location/number settings maybe? As in: my current computer is continental European and I use a mix of British and European settings (decimal separators, dates, language), while the old one is totally British. I can't quite imagine that this would be an issue though.

Link to comment

Well, we needed to produce a new WIG in a crashing hurry, actually running urwigo in a Windows-10 session under VirtualBox on a Mac ... and ... "It worked.  Beautifully."

 

Because I am not yet familiar with this programming environment, I found it very beneficial to be able to work within a visual tool-set that was obviously designed by someone who understood it thoroughly.  Speaking as a professional programmer, I am quick to tip my hat to a colleague and admit that "I am mightily impressed This Is A Great Hack.™" 

 

Of course I have dealt with plenty of "visual programming environments" over these (koff, koff ...) many years, and I need not say what I felt about most of them. But this one is a functional and beneficial tool.  It saved me from a bunch of mistakes that I otherwise would have made "merely due to inexperience," and it enabled me to meet a very tight deadline.  The "real-time error checker" was exceptionally helpful since it pointed out errors in my logic that I otherwise would never have guessed, again "due to inexperience."

 

"Very. Impressive." 

Edited by Team Bear-Cat
Link to comment

This is my first go at Urwigo and I have no experience in programming. After some time I managed to construct a cartridge that works, but I am not happy with the layout of one part. I have calculated the distance between two points using the Lua user expression: Wherigo.VectorToPoint(Player.ObjectLocation,Zonepoint) and got following output: distance(233.015451651, 'm'). Instead I would like to get only 233.015451651, in other words I'd like to get rid of the words distance and 'm'.

Some assistance would be appreciated.

Link to comment

VectorToPoint returns two objects: a distance and a bearing.  Thus:

 

local d2,b2 = Wherigo.VectorToPoint(Player.ObjectLocation, zoneGeocache.Points[1])

local distInMeters = d2("m")
local distInFeet = d2("ft")
local distInMiles = d2("mi")
local distInKm = d2("km")

Wherigo.MessageBox{Text="The geocache zone as related to your location:<BR>Geocache: " .. zoneGeocache.Points[1].latitude .. " " .. zoneGeocache.Points[1].longitude .. "<BR><BR>You: " .. Player.ObjectLocation.latitude .. " " .. Player.ObjectLocation.longitude .. "<BR><BR>Meters: " .. distInMeters .. "<BR>Kilometers: " .. distInKm .. "<BR>Feet: " .. distInFeet .. "<BR>Miles: " .. distInMiles}

I believe miles does not work in some player applications.  I'd suggest testing this and staying with the metric system unless you need to convert it to show in the heathen, arcane system.  Ha, ha.

Link to comment

So I downloaded the software and have made progress building my cartridge. Unfortunately, as I progressed in the build it started crashing frequently. I am running windows 10. First the sound don't play in the emulator then it just crashes.   I am a total newbie and have been following the You Tube tutorial. I really like the interface of the application but the near constant crashing is making it unworkable. Anyone else experience this? Is there a solution or should I try Earwigo? 

 

Thx

GG

Link to comment

Sadly the official Install Link (https://www.urwigo.cz/?page_id=6 and then Install) gave me a 404 today (Btw the HTTPS Certificate expired on 11th June).

I was able to obtain the Installer from Archive.org, but that is not a very good solution in my opinion.

I Hope That the official Link will work again some day.

@yourself will you fix the Download (and Certificate) or is Urwigo already discontinued?

Link to comment

When using a command on an item, how do I get a reference to the item in Lua User Code.

 

I want to write a script that can be added to  multiple items that then modify the item, but I need to know what item called it.

 

Thanks in advance for any help.

 

Never mind, I found it by trial and (mainly) error, it is “self” for those who are curious.

Edited by The Royles
Found it
Link to comment

OPGELOST

 

I created a cartridge with Urwigo. I am pleased with it. I created a GWZ-file and uploaded it to the Wherigo.com website. It uploaded fine, but I cannot download it. The error message is: 

Error During Upload

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Exception of type 'System.ApplicationException' was thrown. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Wherigo.GSPCartridgeService.CartridgeService.GetCompiledCartridgeWithMetaData(GWZMetaData gwzMetaData, String CartridgeFileName, String CartridgeId, Int64 PlayerId, String PlayerName, DeviceType deviceType, String CompletionCode) at cartridge_download.btnDownload_Click(Object sender, EventArgs e)

Edited by DeborahVanDerLinden
opgelost
Link to comment
18 hours ago, J3chy said:

hello, how do I create a true or false? thank you

In the left upper-left section, you will the block "Value" under "Expressions" between "Contains" and "Answer". Put the block at the place you need. Then you can change the value at the right section

Link to comment

are many people using this builder, reading this forum ?

 

i have been trying to create a cartridge but running into problems and  would require some help, where is the best place to go, other than read tutorials , .

 

why is the emulator so small on the screen and doesnt expand to show the cartrdige very well, , you must scroll sideways to see screens or scroll down etc.., does it not resize to content?

Link to comment

I would like to use an input, and repeat the question until the correct answer is given. When I call the input from the input, I will get a stack overflow after a few tries. I am trying to solve this issue, by using Lua. I tried a "repeat until", but then the input is called indefinitely. The program does not stop and wait for the answer / entry by the user. Does anyone know how I can program this (with Lua or just in the Urwigo builder), without having the input loop to itself, but repeat until the correct answer is given? I just cannot get the program to wait for a second answer.

  • Upvote 1
Link to comment
On 1/13/2023 at 2:55 AM, Challenger519 said:

are many people using this builder, reading this forum ?

 

i have been trying to create a cartridge but running into problems and  would require some help, where is the best place to go, other than read tutorials , .

 

why is the emulator so small on the screen and doesnt expand to show the cartrdige very well, , you must scroll sideways to see screens or scroll down etc.., does it not resize to content?

It is even worse. When I test the cartridge on my telephone, it does not have the same results as the emulator. The result on the telephone is worse. It shows things horizontal that are vertical in the emulator. And it does not show all the letters on the buttons on the telephone, while it does on the emulator. I cannot get the emulator bigger, but my telephone is also that limited, so I don't mind about that part.

Link to comment
50 minutes ago, DeborahVanDerLinden said:

I would like to use an input, and repeat the question until the correct answer is given. When I call the input from the input, I will get a stack overflow after a few tries. I am trying to solve this issue, by using Lua. I tried a "repeat until", but then the input is called indefinitely. The program does not stop and wait for the answer / entry by the user. Does anyone know how I can program this (with Lua or just in the Urwigo builder), without having the input loop to itself, but repeat until the correct answer is given? I just cannot get the program to wait for a second answer.

If I understood your problem right have to do just something like the following pseudocode:

onAnswer

   if correct then do something 

   else open input

You can do it with the URWIGO blocks

Link to comment
On 1/13/2023 at 2:55 AM, Challenger519 said:

are many people using this builder, reading this forum ?

 

i have been trying to create a cartridge but running into problems and  would require some help, where is the best place to go, other than read tutorials , .

 

why is the emulator so small on the screen and doesnt expand to show the cartrdige very well, , you must scroll sideways to see screens or scroll down etc.., does it not resize to content?

Yes, unfortunately the emulator isn't the best. But for most thinks it is enough. You may have more luck with webwigo (https://www.webwigo.net/)

 

The best place to get support is this forum.

  • Upvote 1
Link to comment
7 minutes ago, capoaira said:

If I understood your problem right have to do just something like the following pseudocode:

onAnswer

   if correct then do something 

   else open input

You can do it with the URWIGO blocks

The problem is, that I want to open the same input again. That is bad programming. It will cause the program to crash if it takes multiple tries. I would like the program to perform a while-do or repeat-until contruction, instead of calling the same input from within that input again and again. To make it more stable. But when I try that, the program does not wait for the answer.

  • Upvote 1
Link to comment

Thats bacause ist is not like reading from command line in java, bash/shell, haskell,...

You have an input field and a button to send the value. In the onAnswer method gives you the input as parameter.

In Wherigo it is not a problem to call the same input multiple time. I use the same construct since years without problems.

It may be a problem if the events are not triggered and you have multiple input at the same time. But if the event submiting the value, it input is gone. So you can call it again.

Link to comment
3 hours ago, capoaira said:

Thats bacause ist is not like reading from command line in java, bash/shell, haskell,...

You have an input field and a button to send the value. In the onAnswer method gives you the input as parameter.

In Wherigo it is not a problem to call the same input multiple time. I use the same construct since years without problems.

It may be a problem if the events are not triggered and you have multiple input at the same time. But if the event submiting the value, it input is gone. So you can call it again.

Thank you for your answer. I will keep doing it like that.

Link to comment
14 hours ago, DeborahVanDerLinden said:

I would like to use an input, and repeat the question until the correct answer is given. When I call the input from the input, I will get a stack overflow after a few tries. I am trying to solve this issue, by using Lua. I tried a "repeat until", but then the input is called indefinitely. The program does not stop and wait for the answer / entry by the user. Does anyone know how I can program this (with Lua or just in the Urwigo builder), without having the input loop to itself, but repeat until the correct answer is given? I just cannot get the program to wait for a second answer.

 

 

I have uploaded an image of how to do the input question in urwigo. There are also some tutorials on youtube which maybe helpful.

https://www.youtube.com/watch?v=DNU7QB5lhVM&list=PLVOklFuhstMnLk-fXSy9fnpHe9AojCWeV&index=3

 

Other Wherigo tutorials:

https://www.youtube.com/playlist?list=PLIJExYUsAIWev2Ufb36md1_NE2RGzVHlv

 

input1.png

  • Upvote 1
Link to comment
1 hour ago, Challenger519 said:

i think i have the exact same issue, I want to ask a question,a good results does  this. and a bad result, plays a sound and then I want it to ask the question again...and the player must stay  and asnwer it until a good result is achieved

You could make a quick little cartridge using Wherigo\\kit (link in my signature) with two zones and a question.  Once you have that set up, you could export a zip file with the cartridge to your computer, then import the lua file into Uriwgo and see how it's set up.  In short:

  • OnGetInput (let's call your input MyQuestion)
    • Store the input value into the "answer" variable
    • If the answer is equal to "theCorrectAnswer" then
      • (The "this" you mentioned when a correct answer is given)
    • else
      • Play sound "buzzer"
      • MyQuestion.GetInput
    • end if
  • Upvote 1
Link to comment
On 1/15/2023 at 7:23 PM, Forest-Ghost said:

 

 

I have uploaded an image of how to do the input question in urwigo. There are also some tutorials on youtube which maybe helpful.

https://www.youtube.com/watch?v=DNU7QB5lhVM&list=PLVOklFuhstMnLk-fXSy9fnpHe9AojCWeV&index=3

 

Other Wherigo tutorials:

https://www.youtube.com/playlist?list=PLIJExYUsAIWev2Ufb36md1_NE2RGzVHlv

 

input1.png

This has solved my problem  to a Tee, Thanks so much!

Link to comment
22 hours ago, Forest-Ghost said:

@Challenger519 does this question display without a picture? Or does the question not display either? If its the latter than you'll need to make input call.

 

You'll also want to make sure the image is in jpeg format, although I think the builder may except png and perhaps a couple other formats as well.

The image does not display at all, but the question does. I am fairly certain the image is a .jpeg format

Link to comment
On 1/20/2023 at 10:22 PM, Forest-Ghost said:

@Challenger519 does this question display without a picture? Or does the question not display either? If its the latter than you'll need to make input call.

 

You'll also want to make sure the image is in jpeg format, although I think the builder may except png and perhaps a couple other formats as well.

 

On 1/15/2023 at 7:23 PM, Forest-Ghost said:

 

 

I have uploaded an image of how to do the input question in urwigo. There are also some tutorials on youtube which maybe helpful.

https://www.youtube.com/watch?v=DNU7QB5lhVM&list=PLVOklFuhstMnLk-fXSy9fnpHe9AojCWeV&index=3

 

Other Wherigo tutorials:

https://www.youtube.com/playlist?list=PLIJExYUsAIWev2Ufb36md1_NE2RGzVHlv

 

input1.png

So logically this approach appears to work, but it also creates an error. this error, I am not sure how to fix, perhaps someone else knows.as you can see by the yellow exclamation point an error exists . preventing compiling

 

error.JPG

urwigologic.JPG

Link to comment
On 1/20/2023 at 10:22 PM, Forest-Ghost said:

@Challenger519 does this question display without a picture? Or does the question not display either? If its the latter than you'll need to make input call.

 

You'll also want to make sure the image is in jpeg format, although I think the builder may except png and perhaps a couple other formats as well.

i have noticed if I create a .gwz file, the question marks display within webwigo, but if it is a .gwc they do not. When using a .gwz file other images do not display, such as what I would call the main screen , yet the question marks dont.

Link to comment
On 1/21/2023 at 8:08 PM, Challenger519 said:

The image does not display at all, but the question does. I am fairly certain the image is a .jpeg format

 

You might check the image name as it appears on your desktop and shorten it if its long. If there is a long name or special characters sometimes images will not display.

 

On 1/21/2023 at 10:35 PM, Challenger519 said:

i have noticed if I create a .gwz file, the question marks display within webwigo, but if it is a .gwc they do not. When using a .gwz file other images do not display, such as what I would call the main screen , yet the question marks dont.

 

For the purposes of the builder you will only be using the .gwz file. GWC is used for the player and will not work in urwigo unless you load it into the emulator.

 

 

On 1/21/2023 at 9:02 PM, Challenger519 said:

i have tried loading a ranger\\kit Wherigo creation into urwigo...and I get no images,data, questions , nothing? is there a procedure?

 

Yes, you'll want to create a folder that contains all of the contents of the Wherigo kit zip file, than when you goto import the .lua file from that folder, make sure you save the new urwigo file within that same folder.

 

 

On 1/21/2023 at 10:06 PM, Challenger519 said:

So logically this approach appears to work, but it also creates an error. this error

 

Make sure that the input and play sound commands are inside of the bar  labeled "On Clicked." Wherigo is an event driven program which means that there always has to be some type of action going on by the player to advance the experience forward. 

Link to comment
On 1/22/2023 at 5:06 AM, Challenger519 said:

 

So logically this approach appears to work, but it also creates an error. this error, I am not sure how to fix, perhaps someone else knows.as you can see by the yellow exclamation point an error exists . preventing compiling

 

error.JPG

urwigologic.JPG

Place the Input earlier, in the On clicked instead of after the On clicked of the message. Otherwise the program will simultaneously do the message and the input.

Link to comment
5 hours ago, Delta68 said:

Using Urwigo, is it possible to include other .lua files?

A quick Google suggests this should be possible:

 

dofile("filename.lua")

 

but when I tried (with the .lua file in the same directory as the .urwigo file), I got a linker error on compilation.

Thanks

 

The Groundspeak compiler won't allow this, so no.

  • Helpful 1
Link to comment

I think it is possible to include other lua files in Urwigo, at least I've done something like that. However the way to include them is by using require("filename.lua") in the "Lua user directives" window. (I'm writing this from the top of my head, as I don't have my Urwigo install on this machine.)

Edited by Mangatome
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...