a layer of 20 pictures (counter of arrows from 20 to 00)
a layer to have a marker ‘offensive fire’.
a layer to have a marker ‘defensive fire’
a trigger to decrease the arrows when the layer ‘offensive fire’ or ‘defensive fire’ is active.
Tha’s ok… BUT there is a problem :
CTRL + O : marker ‘offensive fire’ and the arrows decrease from 20 to 19.
CTRL + D : marker ‘defensive fire’ and the arrows decrease from 19 to 18.
The problem :
If i switch off the marker ‘offensive fire’, the counter decrease again !
Because the other one layer (‘defensive fire’) is still active…
If i switch off the last one layer : no problem of decrease because there is no active layer yet…
CTRL-O => offensive fire (and the counter : -1)
CTRL-D => defensive fire (and the counter : -1)
now : CTRL-D again (to switch off offensive fire) : the counter : -1 ! (because the defensive fire is still active…)
please, see prototype : Manage_Missiles and Tir_OffDef
I have fixed the module - you can grab the revised version here: mediafire.com/vassalpro
it is the file called CryHavocRevised.zip
Take a look at the 2 protos you mentioned to see how it works. This is a case where you dont want to use triggers but a DP instead, also notice the trait order and that I use fewer key commands by combining the sound keys with the DP keys - this is permissible
Reason I mention trait order - looking at other protos your stacks appear backwards in places. This is fine for report traits and triggers in general but could cause you trouble further down the more complex a module you build.
see this thread : vassalengine.org/forums/viewtopic.php?t=178
It can not be stressed enough that order is very important, so reexamine and make sure you are following these guidelines and this includes the embedding of your prototypes within other prototypes.
Any questions or cant follow whats been done just ask