Page 1 of 1

Vassal property minus one question

PostPosted: October 21st, 2019, 10:33 pm
by iam2509
Vassal property minus one question

I have set it up to have the "Reset to Level" go to $HullAmount$. The picture shows the Layer commands and this works perfectly. The player can manually set the $HullAmount$ to say 18 and it will go to Level 18. (The player sets HullAmount through a Dynamic Property which then triggers the Reset to Level command).

Vassal question.png
Vassal question.png (72.74 KiB) Viewed 878 times


But how do I set it up to have the "Reset to Level" go to $HullAmount$ minus one? I want Vassal to go to Level 17 when the player enters 18 for $Hull Amount$. It seems simple to me but

I have tried everything with and without the GetProperty command and everything comes up error non-numeral result.

Thanks for any help.

Re: Vassal property minus one question

PostPosted: November 5th, 2019, 2:40 pm
by kerkael
Hi, I think your $HullAmount$ can't be interactively set from the layout window.
You need to set a DynamicProperty as another trait for your piece, asking for the player to enter the value. This will give you both a Menu Command, and a Key Command.
Then a trigger will watch for that Key Command to send your sethull Key command.
If it's on 1 piece the menu and the layer applies, the traits belong to the same piece.
If you need something more global, then a GKC with a menu/option button would work, but that time with a Global Property.

Re: Vassal property minus one question

PostPosted: November 5th, 2019, 2:49 pm
by JoelCFC25
You can do this automatically with a Calculated Property, as I described to the OP when he asked on Consimworld as well: http://talk.consimworld.com/WebX?14@@.ee6f15c/9268

Re: Vassal property minus one question

PostPosted: November 5th, 2019, 4:39 pm
by shilinski
I'm surprised at the answers you got.
It the "reset to level" field, enter this: {HullAmount-1}
or better still (because it will verify what you enter), click on the calculator icon to the right and enter: HullAmount-1
You don't need a dynamic property.

Re: Vassal property minus one question

PostPosted: November 5th, 2019, 6:16 pm
by JoelCFC25
I'm surprised at the need to toss in a superfluous, patronizing jab at those who attempted to help.

Didn't remember that the "calculator" icon there (which wasn't always present) implies that BeanShell can be evaluated on the fly in this spot. If it works better than what was suggested, great!