In order to avoid introducing a too complex expression in a trigger condition, I tried to save the variuos conditions on markers, like Cond1, Value : , Cond2, Value : , …, CondN : and then set as condition in the trigger :
$Cond1 $|| $Cond2$ || … || $CondN$. It works!
Unfortunately, I also have to run a trigger when this condition is false.
I tried different syntax forms, but none works.
What, if any, is the correct syntax to use to solve this problem?
Thanks in advance for your support on that matter.
Panther 2010
Hi … Multiple options can be used. Let me show you some :
1- Create all the possible triggers you want and disable some, based on conditions :
Restriction: Disable (or Hide, if you prefer)
Restrict when properties match : {GO1Level<(3-GetProperty($PlayerSide$+"_RequirementModifierGP"))}
This quite complex formula prevents a card to be played if we have not reached the Global Counter GO1Level level 3 yet. But the player may have an individual GP modifying these prerequisites … I have 5 colors, so 5 GP : Blue_RequirementModifierGP, Black_RequirementModifierGP, …Red_RequirementModifierGP
Restrict these commands : place as many as you want here
2- Define matching properties in the trigger trait
Trigger when properties match: globalTMUpdate!=0
or
Trigger when properties match: {$PlayerSide$==“Green”}
3- Define multiple commands, but ensure they only apply to a player:
Keyboard Command: ScorePlusOne
Global Key Command: PlusOneRed
Matching Properties {PlayerSide==“Red”}
The point here is that a button may be pushed by any player, but this would only increase the score of the current player color.
4- to answer your question, the restriction can be based on multiple-choice:
Restriction: Disable
Restrict when properties match: {Generation> “1”||map =~ “cards”||map =~ “hand”||map =~ “research”}
That trait will prevent the card to be moved (the Key Command was to mix 2 decks) :
After Generation 1
During Generation 1, if the card is in a map named “blablabla_cards”, or “blabla_hand”, or “research_blabla”
There are 4 maps per player, and all the maps are named by the player color and either map, or hand, cards, or research.
Let me explain a bit better what I’m doing and what is the problem.
I made a protype, called CRT (Combat Result Table) to simulate the CRT of a game. Unfortunately, a very big amount of trigger conditions is necessary to do this.
I tried to drastically reduce the number of triggers saving each single condition on a marker like this :
Name : Cond1 Value : RANGE=~1|2 && ASP=~1|2 && CH=~1|2,
where RANGE is the distance between units (Row) , ASP is the Odd (Column) and CH is the die roll.
I tried to use the following condition in the trigger : Cond1 || Cond2|| … ||CondN, but this doesn’t work.
I used these syntax expressions to test a single condidion : if(GetProperty(Cond1), “true”,“false”)) and if(GetProperty(“Cond1”), “true”,“false”)), but I always obtain a “false” response.
The if(GetProperty(Property, Value1, value2) works well with numbers, strings and even booleans, but doesn’t work with a condition like Cond1.
If someone of the “Vassal Gods” knows the correct answer of this question, please, help me.
Ah, I see? You want the marker to contain a string to be evaluated as a condition.
Did you try with a calculated property instead?
Also if you want to evaluate the content of a trait, you should encapsulate it between $ $, as this example from the design guide :
CurrentTurn = $2d6_result$
It may also be possible your trait needs to be called from the trigger condition, AND evaluated, so $$Cond1$$ should work … maybe ?