Trigger as Listener?

Can a Trigger be set up to passively listen for a set of conditions, and then fire? There should be no player intervention or required keystrokes.

I’m trying to have a trigger fire on a piece when a certain dice result comes up. I’ve been using the ‘Trigger when properties match’ box but the piece doesn’t react–I have to trigger it manually.

No, there is no true passitivity currently in Vassal. Youll always need a
keystoke somewhere (even if silent/hidden from player interaction) to make
things happen right now. What you want requires an evolution so to speak of the
current functions in how they work.


From: mycenae ed@crucible.cc
To: messages@vassalengine.org
Sent: Wed, February 23, 2011 10:01:55 AM
Subject: [messages] [Module Design] Trigger as Listener?

Can a Trigger be set up to passively listen for a set of conditions, and
then fire? There should be no player intervention or required
keystrokes.
I’m trying to have a trigger fire on a piece when a certain dice result
comes up. I’ve been using the ‘Trigger when properties match’ box but
the piece doesn’t react–I have to trigger it manually.


Read this topic online here:
https://forum.vassalengine.org/t/trigger-as-listener/3690/1

I think one could achieve this effect by putting a multi-action button on
the toolbar, which first invokes the die-roller, setting a global property
with the result, and then sends a GKC to all pieces on the board.

Thoughts?

Pieter


From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Timothy Mccarron
Sent: Wednesday, February 23, 2011 11:38 AM
To: messages@vassalengine.org
Subject: Re: [messages] [Module Design] Trigger as Listener?

No, there is no true passitivity currently in Vassal. Youll always need a
keystoke somewhere (even if silent/hidden from player interaction) to make
things happen right now. What you want requires an evolution so to speak of
the current functions in how they work.


From: mycenae ed@crucible.cc
To: messages@vassalengine.org
Sent: Wed, February 23, 2011 10:01:55 AM
Subject: [messages] [Module Design] Trigger as Listener?

Can a Trigger be set up to passively listen for a set of conditions, and
then fire? There should be no player intervention or required
keystrokes.
I’m trying to have a trigger fire on a piece when a certain dice result
comes up. I’ve been using the ‘Trigger when properties match’ box but
the piece doesn’t react–I have to trigger it manually.


Read this topic online here:
https://forum.vassalengine.org/t/trigger-as-listener/3690/1

Thats the way to do it right now.


From: pgeerkens pgeerkens@hotmail.com
To: messages@vassalengine.org
Sent: Wed, February 23, 2011 10:42:41 AM
Subject: Re: [messages] [Module Design] Trigger as Listener?

I think one could achieve this effect by putting a multi-action button on the
toolbar, which first invokes the die-roller, setting a global property with the
result, and then sends a GKC to all pieces on the board.

Thoughts?

Pieter


From:messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Timothy Mccarron
Sent: Wednesday, February 23, 2011 11:38 AM
To: messages@vassalengine.org
Subject: Re: [messages] [Module Design] Trigger as Listener?

No, there is no true passitivity currently in Vassal. Youll always need a
keystoke somewhere (even if silent/hidden from player interaction) to make
things happen right now. What you want requires an evolution so to speak of the
current functions in how they work.


From:mycenae ed@crucible.cc
To: messages@vassalengine.org
Sent: Wed, February 23, 2011 10:01:55 AM
Subject: [messages] [Module Design] Trigger as Listener?

Can a Trigger be set up to passively listen for a set of conditions, and
then fire? There should be no player intervention or required
keystrokes.
I’m trying to have a trigger fire on a piece when a certain dice result
comes up. I’ve been using the ‘Trigger when properties match’ box but
the piece doesn’t react–I have to trigger it manually.


Read this topic online here:
https://forum.vassalengine.org/t/trigger-as-listener/3690/1

Thanks, Pieter, that actually works beautifully! I got it to work in a test module.

So now there’s an additional complication. The GKC that checks for the die roll result should also check a certain on each affected piece and only affect the ones of a certain color. So I’d like to put a complex property check in the GKC ‘Matching Properties’ box, but I’m not sure of the syntax of the statement to make sure it’s evaluated right. Would it use parentheses? Wavy brackets? Square brackets?

The raw statement would look something like this:

$Dice_result$ = 3 || $Dice_result$ = 10 && $Color$=Red || $Color$ = Blue

This is intended to tell the GKC, if the result is a 3 or a 10, and the piece is Red or Blue, fire.

How would this get punctuated? It doesn’t seem to be documented.

I believe you need to set this up with complex variables, so that the test
looks something like this:

$Mod_Dice_Result$ = 10_3 && $Mod_Color$ = Red_Blue

With earlier tests setting Mod_Dice_Result and Mod_Color

At this time there is no provision for brackets, or precedence, in the
expression tester.

Pieter

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of mycenae
Sent: Wednesday, February 23, 2011 4:39 PM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: Trigger as Listener?

Thanks, Pieter, that actually works beautifully! I got it to work in a
test module.

So now there’s an additional complication. The GKC that checks for the
die roll result should also check a certain on each affected piece and
only affect the ones of a certain color. So I’d like to put a complex
property check in the GKC ‘Matching Properties’ box, but I’m not sure of
the syntax of the statement to make sure it’s evaluated right. Would it
use parentheses? Wavy brackets? Square brackets?

The raw statement would look something like this:

$Dice_result$ = 3 || $Dice_result$ = 10 && $Color$=Red || $Color$ = Blue

This is intended to tell the GKC, if the result is a 3 or a 10, and the
piece is Red or Blue, fire.

How would this get punctuated? It doesn’t seem to be documented.


Read this topic online here:
https://forum.vassalengine.org/t/trigger-as-listener/3690/5

I think you would want to use a regular expression

$Dice_result$ ~= 10|3 && $Color$ ~=Red|Blue

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of pgeerkens
Sent: Wednesday, February 23, 2011 5:05 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Module Design] Re: Trigger as Listener?

I believe you need to set this up with complex variables, so that the test
looks something like this:

$Mod_Dice_Result$ = 10_3 && $Mod_Color$ = Red_Blue

With earlier tests setting Mod_Dice_Result and Mod_Color

At this time there is no provision for brackets, or precedence, in the
expression tester.

Pieter

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of mycenae
Sent: Wednesday, February 23, 2011 4:39 PM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: Trigger as Listener?

Thanks, Pieter, that actually works beautifully! I got it to work in a
test module.

So now there’s an additional complication. The GKC that checks for the
die roll result should also check a certain on each affected piece and
only affect the ones of a certain color. So I’d like to put a complex
property check in the GKC ‘Matching Properties’ box, but I’m not sure of
the syntax of the statement to make sure it’s evaluated right. Would it
use parentheses? Wavy brackets? Square brackets?

The raw statement would look something like this:

$Dice_result$ = 3 || $Dice_result$ = 10 && $Color$=Red || $Color$ = Blue

This is intended to tell the GKC, if the result is a 3 or a 10, and the
piece is Red or Blue, fire.

How would this get punctuated? It doesn’t seem to be documented.


Read this topic online here:
https://forum.vassalengine.org/t/trigger-as-listener/3690/5

$Dice_result$ = 3 || $Dice_result$ = 10 && $Color$=Red || $Color$ = Blue

I know this is a monkey with a math problem type of question but where on the keyboard are the up and down lines between 3 and $, and Red and $? ie How does someone put those up and down lines in when typing?

Thanks

Those vertical bar characters (|) are called ‘pipes’.

On my Mac keyboard, the pipe is on the backslash () key above the Return button, but it might be different on a PC keyboard.

||||||!!!

Mycenae,

Thanks (Two broken up and down lines appear above my backslash so never thought it would appear as a solid up and down line)

Thus spake iam2509:

$Dice_result$ = 3 || $Dice_result$ = 10 && $Color$=Red ||
$Color$ = Blue

I know this is a monkey with a math problem type of question but where
on the keyboard are the up and down lines between 3 and $, and Red and
$? ie How does someone put those up and down lines in when typing?

The pipe ‘|’ is the shifted character on the backslash key on my keyboard.


J.