[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Changes for TURN triggers



Now I'm not quite sure what to do with the HAVE_UNIT and HAVE_BUILDING
triggers. The TURN trigger fires on or after the set turn. The two
HAVE_* triggers also accept a turn parameter but it causes them to
be checked only during the specified turn, not afterwards. Should
we change the behaviour to be the same as for TURN and also use
phases, or leave them alone?
Right now I don't think any map uses the turn parameter for those
two so neither approach would cause much havoc.
I have converted the other two triggers to use time index info
as well. The changes make the use of these three triggers somewhat
incompatible with <=0.4.3 but if have decided not to flag the
binary format incompatible as this only affects maps which use
the triggers with values other than -1 or 0.

(I have some more incompatible changes planned anyway, but those
will have to wait for 0.4.5.)

Upgrading your maps to 0.4.4 should be a simple matter of loading
the maps into CoMET and adjusting the trigger data for Turn triggers
(which are now called Timer). Shop Owner and Unit Owner need only
be fixed if the Turn parameter is used. The new numbers are
calculated using the formula:

time index = (turn number - 1) * 2 + (player number - 1)

Turn 1 is time index 0 or 1, turn 2 is 2 or 3, etc.
So if you want to execute during player 1's movement phase on turn
4, you'd have:

time index = (4 - 1) * 2 + (1 - 1) = 6

Jens