Correct test for "blank" zone?

Hello, all. I am trying to write up a “trigger action” for a piece that will trigger on the condition that the piece currently resides outside of any defined zone. I know that I will need to use the CurrentZone property, but what should this value be equal to if the piece is not in a zone? I have tried:

CurrentZone=""
CurrentZone=null
CurrentZone=$null$

and have had no success with any of them. Could someone please let me know what the correct test should be that will return true in this situation? Thanks.

For purposes of demonstration assume you have zones in your module named “ZoneA” and “ZoneB”

In order to make what you want to do work the condition in the trigger would have to read:

CurrentZone != ZoneA || CurrentZone != ZoneB

Pygmalion messages@forums.vassalengine.org wrote:

Post generated using Mail2Forum (mail2forum.com)

Thanks, Tim. I see what you are saying, but I was hoping there was an easier way. You see, I have many zones, and I don’t want to have to type all of those or statements in. I was hoping that any area outside of a zone would have some specific name, so that I could just test for that.

EDIT: So, I just now found out that any area not in a zone is called offboard. So, I can just do the check CurrentLocation=offboard to accomplish this.

Tim,

I think you mean

CurrentZone != ZoneA && CurrentZone != ZoneB

However, I think

CurrentZone=

might do the trick.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Yep, wasn’t thinking - its Monday :slight_smile:

Post generated using Mail2Forum (mail2forum.com)