Create account / Log in

Can you count pieces in a zone?

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Re: Can you count pieces in a zone?

Postby JoelCFC25 » June 13th, 2014, 3:34 pm

Sorry it's taken me so long to poke around with this. You have it all set up just fine except for the crucial component--the MovedOnMap named keystroke that is prompting your Trigger is not occurring. The place where you need to set it--the very lowest setting in the map properties of the Klingon Home Fleet map--is empty.

You need to put MovedOnMap there (and also in the settings for the Main Map, since you want the reverse to work when ships move from that window back onto the Main Map).
JoelCFC25
 
Posts: 729
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Can you count pieces in a zone?

Postby Rindis » June 14th, 2014, 2:40 am

Ah ha!

Yep, that worked. Put in the command for moving out, and that worked too. Creating into the box works fine.

Now... how to get 'delete' to work? It would seem like the thing to do is to create a trigger action where {CurrentZone=="Klingon Home Fleet"}, and watch for CTRL D (delete), but I'm getting very odd results. I have reporting echoing all the moves to the chat box, and once that's in place, the reporting looks normal, except when I delete a piece in the fleet box.

At that point, the reporting says it was deleted from its previous location (if I create directly in the box and then delete the location is blank/empty). And, the SE count does not go down. It does not seem to matter if the trigger is above or below the delete in trait order.
User avatar
Rindis
 
Posts: 198
Joined: December 22nd, 2007, 12:49 am

Re: Can you count pieces in a zone?

Postby JoelCFC25 » June 14th, 2014, 3:22 pm

I would try making a Trigger where the menu text is "Delete" and the keystroke is Ctrl-D, but have the Trigger do the Report of the deletion, then any required adjustment of the Global Property, and finally the actual Delete trait (with some named keystroke and no menu text).
JoelCFC25
 
Posts: 729
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Can you count pieces in a zone?

Postby Rindis » June 15th, 2014, 4:32 pm

JoelCFC25 wrote:I would try making a Trigger where the menu text is "Delete" and the keystroke is Ctrl-D, but have the Trigger do the Report of the deletion, then any required adjustment of the Global Property, and finally the actual Delete trait (with some named keystroke and no menu text).

That fixed global property. However, the reporting is still saying that the unit was deleted from its previous location: If I create a ship in 1004, move it into the Klingon Home Fleet, and then delete it, I get the message, "* C7 deleted in 1004".

Also, since I want it to only modify the KHFSE property when its being deleted from in the Klingon Home Fleet, it would seem to me that I need to limit the trigger to when "{CurrentZone=="Klingon Home Fleet"}", but then I have a delete that can't work on the main map (also, keep in mind this will be far from the only fleet box...).

I tried a trigger that is always valid that fires off commands to a set of other triggers that are conditional, so they can manipulate the correct properties for the actual situation, and then fire off the delete trait, but I can't get the initial trigger to ever be valid....
User avatar
Rindis
 
Posts: 198
Joined: December 22nd, 2007, 12:49 am

Re: Can you count pieces in a zone?

Postby Rindis » June 15th, 2014, 9:08 pm

Okay, re-built the delete triggers completely... And now the menu entry is always valid, but the delete itself doesn't happen from the Home Fleet map. It does work from the main map (each case is handled by a different secondary trigger). However, the main map version has the same reporting error as before; the Klingon Home Fleet map doesn't delete, but the reporting is correct....
User avatar
Rindis
 
Posts: 198
Joined: December 22nd, 2007, 12:49 am

Re: Can you count pieces in a zone?

Postby airjudden » June 30th, 2014, 9:06 pm

I finally got to working on this and it worked like a charm.

Thanks, Joel. You are awesome sauce!
airjudden
 
Posts: 68
Joined: January 30th, 2013, 6:25 am

Re: Can you count pieces in a zone?

Postby samuelw3 » August 3rd, 2014, 6:28 pm

Would the same system work when moving to from a 'board' instead of a zone?

CurrentBoard= Yellow && OldBoard != Yellow

Where the board is named "Yellow"
samuelw3
 
Posts: 46
Joined: August 31st, 2011, 5:34 pm
Location: Columbus OH

Re: Can you count pieces in a zone?

Postby JoelCFC25 » August 4th, 2014, 6:35 pm

I can't think of any reason why it wouldn't work.
JoelCFC25
 
Posts: 729
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Can you count pieces in a zone?

Postby samuelw3 » August 5th, 2014, 7:31 pm

Thanks for the example. It has helped me a ton!
samuelw3
 
Posts: 46
Joined: August 31st, 2011, 5:34 pm
Location: Columbus OH

Previous

Return to Module Design

Who is online

Users browsing this forum: No registered users and 4 guests