@Terhonator: Go
Do not count the free wandering, alive scientists. Negate your test and it will work. If a cargo unit dies, the trigger below will start its actions, too.
Count Dead Scientists
Events
Unit - Any Unit dies
Local Variables
Conditions
( Unit Type Of ( Triggering unit ) == Scientist )
Actions
Variable - Modify iScientistDead + 1
General - If (Conditions) then do (Actions) else do (Actions)
If
( iScientistDead >= 4 )
Then
Objective - Mark Main: At least 4 Scientists must survive as Failed
Game - End game in Defeat for player 1 (Hide dialogs, Hide score screen)
Else
Comment ----- Wait for more dead scientists
Thanks for answer. I have used that kind of trigger earlier to count some things. It seems to be best solution to use variable in that kind of situation.
On my map player have 8 Scientists and at least 4 of them must survive.
My current trigger:
So when I load Scientists into transport game counts those units dead. Any idea how to fix this trigger?
@Terhonator: Go Do not count the free wandering, alive scientists. Negate your test and it will work. If a cargo unit dies, the trigger below will start its actions, too.
Count Dead Scientists
Thanks for answer. I have used that kind of trigger earlier to count some things. It seems to be best solution to use variable in that kind of situation.