Create account / Log in

Vassal property minus one question

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Vassal property minus one question

Postby iam2509 » October 21st, 2019, 10:33 pm

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 922 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.
User avatar
iam2509
 
Posts: 72
Joined: August 1st, 2010, 12:01 am

Re: Vassal property minus one question

Postby kerkael » November 5th, 2019, 2:40 pm

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.
kerkael
 
Posts: 117
Joined: December 1st, 2017, 3:03 pm

Re: Vassal property minus one question

Postby JoelCFC25 » November 5th, 2019, 2:49 pm

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
JoelCFC25
 
Posts: 579
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Vassal property minus one question

Postby shilinski » November 5th, 2019, 4:39 pm

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.
shilinski
 
Posts: 87
Joined: December 22nd, 2007, 8:46 am
Location: Laurel, Maryland

Re: Vassal property minus one question

Postby JoelCFC25 » November 5th, 2019, 6:16 pm

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!
JoelCFC25
 
Posts: 579
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN


Return to Module Design

Who is online

Users browsing this forum: No registered users and 0 guests