Dynamic Property Woes

In two separate modules I have the same setup. A dynamic property with a value of either 0 or 1, that is numeric and that wraps. In both modules I have a pair of commands that change these values. I also have (in the proper order) a pair of Restricted Command commands that hide the alternate command after one command is invoked. (A tap/untap function. While the card is tapped the card only shows the untap function. While untapped it only shows the Tap option.)

In one module the value of the dynamic property seems to be properly set to 0 at the beginning of the game. In the second module the dynamic property is not set, and both options appear until one is selected and fires. At that point the property sets properly and hides the proper command…

What am I missing/screwing up in the second module that it isn’t setting the command properly?

Alternately, what can I do to make sure the function is set properly when the card in question is created?

Hi ABCoLD,

I’m trying really hard, but your telepathic message that includes an example link to your modules is just not coming through :slight_smile:

Seriously, no one wants to spend time trying to diagnose your problem without looking at the actual module. Debugging modules is time consuming and hard enough with the module in hand, without wasting time speculating on possible peoblems.

B.

On 4/05/2009 at 2:32 PM ABCoLD wrote:


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

It was a simple fix, actually. I forgot to set the initial value of the dynamic property! (The Value field underneath the Name field in the Dynamic property I left the same as the name.)

Sorry to bother you with such a stupid question! It’s always the small things that trip a person up it seems. At least that’s how it is with me. :slight_smile:

You answered your own question when you said you hadn’t set it. I believe a dp has a null value until it is given a proper value. Unless you tested for null, it won’t trigger.

On to your second question, you can be sure they are all set by prototyping the dp setup with an initial value.