<Effect name="Victory conditions 4 units">
<Param name="Note" dispName="Read!" varType="string">Put this trigger on loop!</Param>
<Param name="SrcObjectP1" dispName="P1 unit" VarType="unit">default</Param>
<Param name="SrcObjectP2" dispName="P2 unit" VarType="unit">default</Param>
<Param name="SrcObjectP3" dispName="P3 unit" VarType="unit">default</Param>
<Param name="SrcObjectP4" dispName="P4 unit" VarType="unit">default</Param>
<Param name="LoseText" dispName="Lose Text (playername)" VarType="string">has lost!</Param>
<Param name="WinText" dispName="Win Text (playername)" VarType="string">has won!</Param>
<Command>if(trQuestVarGet("lostrovictoryconditionsfourplayerslolxDP1")==0){</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP1">trUnitSelect("%SrcObjectP1%");</Command>
<Command>if(trUnitDead()==true){</Command>
<Command>trQuestVarSet("lostrovictoryconditionsfourplayerslolxDP1", 1);</Command>
<Command><![CDATA[trChatSendSpoofed(0, "<color=0.0,0.0,1.0>{playername(1)} %LoseText%</color>");]]></Command>
<Command>trSoundPlayFN("lose.wav", "1", -1, "","");</Command>
<Command>}}</Command>
<Command>if(trQuestVarGet("lostrovictoryconditionsfourplayerslolxDP2")==0){</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP2">trUnitSelect("%SrcObjectP2%");</Command>
<Command>if(trUnitDead()==true){</Command>
<Command>trQuestVarSet("lostrovictoryconditionsfourplayerslolxDP2", 1);</Command>
<Command><![CDATA[trChatSendSpoofed(0, "<color=1.0,0.0,0.0>{playername(2)} %LoseText%</color>");]]></Command>
<Command>trSoundPlayFN("lose.wav", "1", -1, "","");</Command>
<Command>}}</Command>
<Command>if(trQuestVarGet("lostrovictoryconditionsfourplayerslolxDP3")==0){</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP3">trUnitSelect("%SrcObjectP3%");</Command>
<Command>if(trUnitDead()==true){</Command>
<Command>trQuestVarSet("lostrovictoryconditionsfourplayerslolxDP3", 1);</Command>
<Command><![CDATA[trChatSendSpoofed(0, "<color=0.0,1.0,0.0>{playername(3)} %LoseText%</color>");]]></Command>
<Command>trSoundPlayFN("lose.wav", "1", -1, "","");</Command>
<Command>}}</Command>
<Command>if(trQuestVarGet("lostrovictoryconditionsfourplayerslolxDP4")==0){</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP4">trUnitSelect("%SrcObjectP4%");</Command>
<Command>if(trUnitDead()==true){</Command>
<Command>trQuestVarSet("lostrovictoryconditionsfourplayerslolxDP4", 1);</Command>
<Command><![CDATA[trChatSendSpoofed(0, "<color=0.0,1.0,1.0>{playername(4)} %LoseText%</color>");]]></Command>
<Command>trSoundPlayFN("lose.wav", "1", -1, "","");</Command>
<Command>}}</Command>
<Command>if(trQuestVarGet("lostrovictoryconditionsfourplayerslolxDP1")==0){</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP1">trUnitSelect("%SrcObjectP1%");</Command>
<Command>if(trUnitAlive()==true){</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP2">trUnitSelect("%SrcObjectP2%");</Command>
<Command>if(trUnitDead()==true){</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP3">trUnitSelect("%SrcObjectP3%");</Command>
<Command>if(trUnitDead()==true){</Command>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObjectP4">trUnitSelect("%SrcObjectP4%");<