Jump to content

Can SOMEONE please show me how to call a lua function in Urwigo?


Followers 1

Recommended Posts

That's not possible, unfortunately. In theory the app could be aware of a mock location being used, but inside the Wherigo itself, the location is just the location. And with a fake GPS that uses root to hide itself, even the app can't know if it's the real location or not.

Link to comment
On 6/12/2019 at 4:57 AM, day1976 said:

Here are two screen shots of a cartridge that I built.

 

The first shows you a list of lua functions that I wrote.

 

The second shows you where I call the lua function to give me a result, which is saved as a variable.

 

Hope that helps.

...

 

 

I am new to building WIGos and I wonder where I can find information on the objects/functions (or what is it called) on the Wherigo Object?

 

In your example you use:

  • Wherigo.Distance
  • Wherigo.TranslatePoint

And I have seen things in other examples like

  • Wherigo.MessageBox

But outside of what I've seen, I wouldn't know what else I can use and how. Thanks for the reply!

Link to comment
1 hour ago, PetoG said:

I am new to building WIGos and I wonder where I can find information on the objects/functions (or what is it called) on the Wherigo Object?

 

As far as I am aware, there is little documentation on the Wherigo module out there. The few places that I know of, are,

  • The Wherigo Foundation Wiki (link)
  • jakuje.dta3.com (link), which is documentation for Jakuje's Wherigo module (which is supposedly backwards-compatible with Groundspeak's Wherigo module.) It appears to be offline, so I have archived a copy of here.
Edited by Hügh
  • Helpful 1
Link to comment
On 6/17/2019 at 6:04 AM, Vooruit! said:

That's not possible, unfortunately. In theory the app could be aware of a mock location being used, but inside the Wherigo itself, the location is just the location. And with a fake GPS that uses root to hide itself, even the app can't know if it's the real location or not.

 

Circumvent cheating (as much as possible) by forcing a question to user that can ONLY be answered while in the woods and not online. Use that answer in an algorithm that then generates the solution to the cache instead of having embedded coordinates in the cartridge.

  • Upvote 1
Link to comment
Just now, bflentje said:

 

Circumvent cheating (as much as possible) by forcing a question to user that can ONLY be answered while in the woods and not online. Use that answer in an algorithm that then generates the solution to the cache instead of having embedded coordinates in the cartridge.

 

But some of us will still use the phone-a-friend network ;-)

  • Upvote 1
Link to comment
On 2/8/2021 at 3:30 PM, bflentje said:

But some of us will still use the phone-a-friend network ;-)

I know you're playing around.  I still want to reply to that.

 

As a cache owner, your responsibility is to craft an experience that is more valuable than the number people get for signing the log.

  • Upvote 2
  • Love 1
Link to comment
On 6/12/2019 at 3:57 AM, day1976 said:

Here are two screen shots of a cartridge that I built.

 

The first shows you a list of lua functions that I wrote.

 

The second shows you where I call the lua function to give me a result, which is saved as a variable.

 

Hope that helps.

 

 

I'm two year late, but thanks! :D

Link to comment
2 hours ago, Delta68 said:

I've copied day1976's example above, but I keep getting  an error when I test it
Says: attempt to index global value 'zone' (a nil value)

any ideas?

Thanks

 


“zone” is simply the name of a variable that they have declared. You have not declared this variable and thus you are getting that error. 
 

You need to replace “zone” with the name of the variable storing the zone you want to adjust. For example, “zoneABC”. 

Edited by Hügh
Link to comment
On 6/21/2021 at 5:23 PM, Hügh said:


“zone” is simply the name of a variable that they have declared. You have not declared this variable and thus you are getting that error. 
 

You need to replace “zone” with the name of the variable storing the zone you want to adjust. For example, “zoneABC”. 

Surely 'zone' is the variable passed as a parameter to the function.

 

Link to comment
7 hours ago, Delta68 said:

Surely 'zone' is the variable passed as a parameter to the function.

 


It should be… but you never know. The platform is ten (?) years old so there are plenty of weird quirks and exceptions. 
 

Also, are you sure that the argument you’re passing isn’t nil? In the picture above, that’ll be “goalzone” in the pink block. 

Edited by Hügh
Link to comment
On 2/10/2021 at 1:54 PM, Ranger Fox said:

I know you're playing around.  I still want to reply to that.

 

As a cache owner, your responsibility is to craft an experience that is more valuable than the number people get for signing the log.

 

I was just playing around. You've likely seen my profile and know I've hidden a Wherigo or two in my day. So I feel the pain of cheating and coordinate sharing. You and I know it is impossible to stop cheaters. So focusing energy on the Wherigo experience so one doesn't want to cheat in the first place is THE best course of action.

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...
Followers 1
×
×
  • Create New...