Jump to content

Is it just me?


Afterburned

Recommended Posts

I class myself as fairly tech savvy and quite logical.

Why on earth can I not get an IF expression that fires when the player is within proximity of a zone?

I have tried with Wherigo Builder and Urwigo, and neither one will fire in the Emulator.

 

Basically I have characters and items that I want to perform differently when in different zones. I am using Proximity as I know that some Garmin's have problems with being 'In' the zone (onEntry not working etc).

 

I have attached the test.lua but here is the relevant code:

function zitemItem:OnCommand()

-- #GroupDescription=Script --

-- #Comment=Script Comment --

if zoneZone.ZoneState == "Proximity" then

Wherigo.MessageBox{Text=[[inProximity]],}

else

Wherigo.MessageBox{Text=[[Not InProximity]],}

end

end

 

So tell me - is it just me? :blink:

Test.zip

Link to comment

I class myself as fairly tech savvy and quite logical.

Why on earth can I not get an IF expression that fires when the player is within proximity of a zone?

I have tried with Wherigo Builder and Urwigo, and neither one will fire in the Emulator.

 

Basically I have characters and items that I want to perform differently when in different zones. I am using Proximity as I know that some Garmin's have problems with being 'In' the zone (onEntry not working etc).

 

I have attached the test.lua but here is the relevant code:

function zitemItem:OnCommand()

-- #GroupDescription=Script --

-- #Comment=Script Comment --

if zoneZone.ZoneState == "Proximity" then

Wherigo.MessageBox{Text=[[inProximity]],}

else

Wherigo.MessageBox{Text=[[Not InProximity]],}

end

end

 

So tell me - is it just me? :blink:

 

Nop, me too.

I didn't manage a way to make that work. The only thing I managed to do is with Zone's OnProximity/OnRange/OnEnter commands...

Link to comment

You did a proximity of 2 m. Is this right? If yes, it's to tiny. You should use a 20 m proximity for tests. I think, you didn't manage to get in the proximity zone because of unstable coordinates.

 

Garmin didn't have problems to get 'in' a zone. The problem is, that players stop at the edge of the zone. And with unstable coordinates you didn't have to move one step to go in and out of the zone. You should resize your zones (about 20 m x 20 m at minimum) and encourage the players to walk to the center of the zone (a special point in real world).

Link to comment

Than the event OnDistant is fired.

 

But I did some testing. The property "ZoneState" of the zone object is allways nil (it's not defined). You should use the property "State" to get "Proximity", "Distant", "Inside" and so on. That should solve your problem.

 

Thanks for the response - from my testing this means that I cannot do this with Urwigo :tired: as it must use the wrong property.

Earwigo again then....!

Link to comment

I'm using a similary thing, which shows the player the remaining distance to a zone POINT (a zone with 3 EQUAL coords), where he has to place a bomb :anibad: It can be used for "proximity events" too. In the example after each second or 2 or 3 a countdown timer checks whether the player is in a certain range (<=20 meters). If so, an event can be fired (here a simple message). If not the countdown starts again. Have had some problems with timers of typ interval, thats why I only use countdown timer.

post-3481440-042691600 1349892686_thumb.jpg

Link to comment

Hmm, this is again going from the centre point of the zone rather than the actual zone dimensions, so has to assume that the zone is round. Try this with a rectangular zone and you will get very odd results!

Ah well, we have to work with what we have - many thanks for the suggestion!

(I will probably still use your code in another part of the cart anyway :anibad: )

Link to comment

Yes, of course the "zonepoint" is a special thing, but I think this works for a "normal" zone with 4 points too...or not ?

In both cases the "distance to a zone" applies to a point (in 1st case really to 1 point and in 2nd case to a point from the border line of the zone) But I haven't checked it out. I wrote it because I thought this could be a possibility. :smile:

Link to comment

Nope, the behaviour is the same no matter how many points - it works it out from the zones centre.

It does mean if you have a long thin zone this will trigger if you are near the centre but outside the zone, and not if you are in the zone but at one end.

 

In my case I could solve it with placing the zone well, just about get away with a 140m distance from centre that hits all the right points but misses the wrong ones.

 

Thanks for the input, I really need every bit of help building these things.

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...