[messages] [Developers] Re: [Developers] Re: [Developers] Re: [Developers

Michael Kiefte mkiefte at dal.ca
Thu Jul 29 16:06:40 MST 2010

> It seems to me that whether another trait is "inner" or "outer" to the
> Trigger is irrelevant to the case I'm concerned with here.  If a Delete
> trait is below a Trigger, and both the Delete and the Trigger are
> listening for the SHIFT-A, then the Delete will still respond to the
> SHIFT-A before the Trigger.  In fact, the Delete will kill the piece
> before the trigger can even respond to the SHIFT-A.  So it doesn't
> matter if the trait is inner or outer to the Trigger.  It seems to me
> that ALL non-trigger traits, irrespective of inner or outer respond to
> the SHIFT-A before the Trigger does.  That is, if I understand you
> correctly.

That is correct.  If you want the delete to happen last, you should give it
different keystroke and put that keystroke at the end of the chain of
commands that the trigger does in response to SHIFT-A.

> What do you mean by a triggered keystroke?

A keystroke that is generated by a trigger.

> Do you mean a keystroke sent
> by the engine?  Does that apply to Action buttons and Global keystrokes
> as well?

Action buttons are normal.

> Or do you mean only keystrokes sent by Trigger Actions?  If
> the latter, does it matter whether the Trigger Action is in the same
> piece or a different piece?  Or does my question even make sense?

How can a trigger be in a different piece?  Global Key Commands have normal
precedence, though.

> Actually that's something I've been really curious about--the scope of
> key commands.  When a trait issues a key command (e.g. trigger, action,
> or global key command) does that key go to ALL pieces that are listening
> for that key (or in the case of global key commands, does it go to ALL
> MATCHING pieces) -OR- does it only go to some pieces?

It only goes to the piece it's attached to.

You can highlight a whole lot of pieces and trigger them all simultaneously
by issuing the same key stroke, but the order in which the game pieces
receive the command is not defined.  However, for each piece, a separate
command is generated.

Global Key Commands are different in that they are like generating a key
stroke for every piece that applies. But the order of the pieces in not

> E.g. in the case
> of TriggerAction does the key command only go to inner pieces?

No, triggered keystrokes are issued to the bottommost traits and they go up
the chain as normal.

> Not
> understanding this detail is likely the root of much of my confusion.

It's probably not the most straightforward thing in the world.  I think I
would have preferred triggers following the normal precedence.  Likewise
with Report Actions.  There have been times when I wish they had.

- M.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vassalengine.org/pipermail/messages/attachments/20100729/a1bc4f62/attachment.html>

More information about the messages mailing list