Oops, you are correct . You want to use the 'increment' option with the
variable I spec'd. This will perform the math subtraction.

 

The third trigger PME only needs to fire and execute if the final value of
TempCalc DP dictates you need to replace the HighScore GP, so the third
trigger PME needs to be '>' instead of '<" 0 . I was visualizing in my head
and mixed signs up, but the gist is you only want the third trigger to fire
and replace HighScore GP when it has to

 

This will prevent HighScore from always updating

 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Hoalun
Sent: Thursday, October 25, 2007 11:27 PM
To: [email protected]
Subject: Re: [vassalengine] Global property reference

 

If I understand what you are saying here:

--> Add the key command in the TempCalc DP, CTRL X : set it to -$HighScore$
(your other GP, note the minus sign)

This will set the TempCalc property to a negative value with every new card.

--> Add a third trigger that fires on CTRL Y that executes CTRL Z Give it
the PME: TempCalc <0

Won't this trigger will always fire because TempCalc is always negative? 

Or are you saying there is some way to subtract $HighScore$ from $TempCalc$
to see if the results are negative? The DP Key Command has "Increment" and
"Set Value Directly" options but I am unsure how to subtract one value from
another.

Thanks for your help!

-Dale

Won't HighScore always update

Tim McCaron wrote:
> Sounds almost right, just needs some tweaking.
>
> 
>
> The first trigger that sets the DP to the GP (CurrentValue), leave as is.
>
> Have the second trigger follow, but remove the PME on it and rebuild
> differently as follows.
>
> Have the second trigger fire two commands CTRL X and CTRL Y
>
> Add a second DP (lets call it TempCalc) to the card identical to the other
> DP that set CurrentValue but give it a wide numeric range.
>
> Add the key command in the TempCalc DP, CTRL X : set it to -$HighScore$
> (your other GP, note the minus sign)
>
> Add a third trigger that fires on CTRL Y that executes CTRL Z Give it the
> PME: TempCalc <0
>
> Finally add a set GP with command CTRL Z that will set the GP (HighScore)
to
> your Original DP
>
> 
>
> 
>
> _____ 
>
> From: vassalengine@ <mailto:vassalengine%40yahoogroups.com>
yahoogroups.com [mailto:vassalengine@
<mailto:vassalengine%40yahoogroups.com> yahoogroups.com] On
> Behalf Of Hoalun
> Sent: Thursday, October 25, 2007 4:18 PM
> To: vassalengine@ <mailto:vassalengine%40yahoogroups.com> yahoogroups.com
> Subject: Re: [vassalengine] Global property reference
>
> 
>
> Trigger's PME: HighScore < CurrentVal
>
> I am trying to track the highest card currently in play. I have two 
> global properties which are set with initial values of zero. When a new 
> card is played, a GKC on the main map fires the card's trigger to read 
> the value of a dynamic property associated with the card and update 
> CurrentVal with that value. Another trigger also fires from the GKC 
> which checks if HighScore < CurrentVal, and if so send keystrokes to 
> update HighScore with the CurrentVal.
>
> The second trigger is firing no matter what the value of HighScore and 
> CurrentVal are, which means that every time a card is played on the 
> board HighScore is set to CurrentVal (the current card's value) even if 
> a higher card has already been played.
>
> If I can't compare two global properties, is there another way to track 
> the current highest value in play?
>
> Thanks!
> -Dale
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
> 

 



[Non-text portions of this message have been removed]

Reply via email to