Create account / Log in

Global Key Command-Fixed Number of Pieces Not Working

Issues with the Vassal engine.

Moderators: Tim M, uckelman

Global Key Command-Fixed Number of Pieces Not Working

Postby xujunnju » November 28th, 2018, 4:02 am

Dear All,

I have encountered a problem when using the:

global key command- within a Deck, apply to: Fixed number of pieces

when I set the number to be 2, this global key command trait should only apply to
2 pieces within a certain range , but this command will apply to all units within this
range when I tested my module.

Does anyone know how to solve it ? I am making my first module and really
need this trait to work.
Attachments
pic.png
this is the shortcut of my problem
pic.png (24.04 KiB) Viewed 3075 times
xujunnju
 
Posts: 4
Joined: November 28th, 2018, 3:52 am

Re: Global Key Command-Fixed Number of Pieces Not Working

Postby Brent Easton » November 28th, 2018, 11:52 pm

The 'within a Deck, apply to: Fixed number of pieces' only applies to pieces in a Deck that within range 2 of your piece. Any pieces not within a deck that are within range 2 of your piece are not affected in any way by this setting.

To do what I think you want to do, you will need to use a Global property (GP) to count up how many times the GKC has been applied. The source piece will initialise the GP to 2, then send the GKC to all units in range. Each unit in range will need a Trigger that checks if the GP is > 0 and if so, reduce the GP by 1 and execute the command.

Regards,
brent
User avatar
Brent Easton
 
Posts: 2836
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Global Key Command-Fixed Number of Pieces Not Working

Postby xujunnju » November 29th, 2018, 5:44 pm

Yeah, Ok, I get the idea, the pieces must be within a certain deck for this GKC to work,
I just thought it would be working while the pieces are within the same map,
relative new to design vassal module.
thanks :D
xujunnju
 
Posts: 4
Joined: November 28th, 2018, 3:52 am


Return to Technical Support & Bugs

Who is online

Users browsing this forum: No registered users and 5 guests