[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: Requested feature: Remove unit event
On 18.01.2005 18:19, Jens Granseuer wrote:
> On 17.01.2005 22:21, Torinthiel wrote:
> > Just a wild idea: Wouldn't it be easier to remove any event triggered by
> > destruction of unit on removing of that unit? If it's possible (in the
> > code of 'remove unit' event, not a separate event to be programmed by
> > mapmaker) then it wouldn't require modifying much of existing code, as
> > you won't have to change triggering of 'unit destroyed'.
>
> That might be a possibility. I'll have to think some more about the
> implications for dependent events, but it might work.
Unfortunately, it doesn't. The problem is not dependencies, but the
"Any Unit" and "Unit Type" variants of unitdestroyed which simply cannot
be dumped when a unit gets removed.
Suppose the goal of P1 is to kill all enemy infantrymen while P2 needs
to get one of his infantry units somewhere important. Also assume that
this vital unit is the last infantry he's left. When it reaches its
destination and gets removed, who gets the points? Both, P1 because
P2 has no infantry left, or P2 because he delivered the unit?
Jens