mission ends only when all units of enemy are destroyed

Asked by yfm

Wargus has such a lame bug that mission or skirmish ends only when all the enemy units and buildings are destroyed. That really sucks - it's lame to spend hors seeking and destroying one enemy's flying machine all over the map. It must have been fixed... Is there some patch or recommendation how to fix it?

Question information

Language:
English Edit question
Status:
Answered
For:
Wargus Edit question
Assignee:
Pali Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Pali (pali) said :
#2

In script you can define trigger when you defeat or victory.

Default code for single player is in scripts/stratagus.lua:

function SinglePlayerTriggers()
  AddTrigger(
    function() return GetPlayerData(GetThisPlayer(), "TotalNumUnits") == 0 end,
    function() return ActionDefeat() end)

  AddTrigger(
    function() return GetNumOpponents(GetThisPlayer()) == 0 end,
    function() return ActionVictory() end)
end

I think that code is self explained. You can change it here or in specified map.

Can you help with this problem?

Provide an answer of your own, or ask yfm for more information if necessary.

To post a message you must log in.