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

Re: Requested feature: Remove unit event



> 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?

If you agree with the idea I proposed in the "Tutorial campaign" 
thread (mark destroyed/removed units), this issue will be (at least 
partially) resolved:

- if the program finds all units marked as "destroyed", P1 gets the 
score.
- if some units are "removed", all other "destroyed", we have a 
problem. This could be probably defined by the mapper (something like 
"allowremoved" flag in unitdestroyed trigger).

Another approach (just came to my mind):

In the removeunit event the mapper has to choose whether to destroy 
the unit or just remove it. If the unit is to be destroyed, remove it 
from the game (just like it were actually destroyed). If it's to be 
removed, keep it in the game but mark it as "inactive" (or something) 
and ignore it. This way it's not present in the game and the 
unitdestroyed event can still find it in the game.

Andrej
____________________________________
RAMMSTEIN, 22.02.2005 o 20,00, Bratislava Incheba, 
Info: 0904 666 363, http://www.xl.sk