Create account / Log in

What command would I use for this Property Match?

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

What command would I use for this Property Match?

Postby airjudden » March 4th, 2015, 4:02 pm

I have triggered action based on a piece moving from a defined location to another one. The way I did it was by this:

1) On the Map Window, for "Key Command to apply to all units ending movement on this map:" field, I would call it "MovedOnMap"

2) Under the piece, I would set up a Trigger Trait:

a) For "Trigger when properties match: I would type: OldZone!=CurrentZone
b) For "Watch for these Keystrokes" I would type: MovedOnMap
c) I would then assign a keystroke to perform and then have it perform actions based on this.

The problem I ran into is that on one map, instead of adding a Multi-Zoned Grid, I added an irregular grid. I gave the regions on the maps name, but I notice the trigger "OldZone!=CurrentZone" no longer works for the field that triggers when the properties match. I tried "OldRegion!=CurrentRegion" and that did not work either.

What command do use in this instance?

I also wanted to create triggers based on the property match of a piece's location such as "CurrentZone=="VP Track 1" but again, CurrentZone does not appear to work with Irregular grids. I was guessing whatever worked on the first question works here, also, but if not, could you please tell me what command I would need for this field?

Thanks
airjudden
 
Posts: 68
Joined: January 30th, 2013, 6:25 am

Re: What command would I use for this Property Match?

Postby Tim M » March 4th, 2015, 4:47 pm

seems my reply got truncated into another forum...

in case you missed it

When dealing with regions you use OldLocationName and LocationName as they are not Zones as you note, possibly may also need OldMap and/or OldBoard if moving across these. you can also always use x and y coords if all else fails (OldX, OldY, CurrentX, CurrentY)
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1777
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: What command would I use for this Property Match?

Postby Jym » March 4th, 2015, 5:23 pm

You can probably add a Zone-level Global Property "Foo = true" and in your trigger test this.
Same goes for the VP track. If Vassal is not able to get the correct CurrentZone, add a GP "ThisIsVP = true" and check it.
Jym
 
Posts: 13
Joined: January 16th, 2013, 9:15 pm

Re: What command would I use for this Property Match?

Postby airjudden » March 4th, 2015, 7:14 pm

Thanks! Worked like a charm!
airjudden
 
Posts: 68
Joined: January 30th, 2013, 6:25 am


Return to Module Design

Who is online

Users browsing this forum: No registered users and 0 guests