Comrades in Arms Discussion Board
End trigger - Printable Version

+- Comrades in Arms Discussion Board (http://forum.ciahome.net)
+-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3)
+--- Forum: Mission Making (http://forum.ciahome.net/forumdisplay.php?fid=8)
+--- Thread: End trigger (/showthread.php?tid=2909)

Pages: 1 2


End trigger - alias - 02-16-2015

How I recently discovered that triggers are pretty nasty Smile


I've tested my mission Cojones Fritos with few friends twice. Last time was Sunday on CiA server with 4 players.
We had no issue whatsoever.
But seems that same mission with 15 players ended prematurely... in 20 sec or so, apparently mission failed cuz a HVT died despite that wasn't the case.


So, i have an end trigger checking if some unit is still alive, nothing fancy, but it seems that for a split of the second all units are dead/inexistent on server. This is not an issue if lag or disync is insignificant.


But the effect on lag, as expected, is multiplied when there are more players, just enough for the trigger to kick in before the [/size]checked unit "to be alive on server". And that causes a forced end mission.
[/size]


What i did to fix, as Alwarren suggested, is that i added a condition to force the trigger to kick in after the game started and units had time to "become alive" on server:


(time>15) and (!alive HVT)



I didn't know about this method, in translation seems that the trigger will wait 15 seconds after game started to do the checking.
Hopefully this will fix he issue.


Thank you AL!








Re: End trigger - Alwarren - 02-17-2015

(02-16-2015, 11:26 PM)alias link Wrote:So, i have an end trigger checking if some unit is still alive, nothing fancy, but it seems that for a split of the second all units are dead/inexistent on server. This is not an issue if lag or disync is insignificant.

That's what I told you this afternoon on Skype. There is a period of time were the players connect, the player object is on the server at this time and officially dead

It also makes life difficult if you want to assign loadouts on the server, since if you do it too early the player will not get the equip. That was the problem when we tried Shades for the first time.

Pretty annoying, you really need to make precautions for that.

Quote:Thank you AL!

My pleasure Smile


Re: End trigger - Outlawz7 - 02-17-2015

Never had that happen before, is that because HVT is a player/playable unit?


Re: End trigger - Alwarren - 02-17-2015

Yeah


Re: End trigger - alias - 02-20-2015


Related to Cojones Fritos

Well... seems that is another issue than what we thought before.


Premises:
- mission works on dedicated with 4-6 players (tested on 2 different servers)
- mission doesn't work with full house, ending before it's time
- mission ending due All players died  :o
[size=1em]- i do not have any trigger checking on all players
- i have no scripts messing with players damage[/size]
[size=1em]- using 2 CUP squads
[/size]- the only end triggers i have are:



      class Item12
      {
        position[]={7221.2109,-0.10009098,2711.7202};
        activationBy="CIV";
        activationType="NOT PRESENT";
        repeating=1;
        timeoutMin=15;
        timeoutMid=20;
        timeoutMax=30;
        interruptable=1;
        age="UNKNOWN";
        expCond="(time>15) and ((!alive part1) or (!alive part2) or (!alive part3))";
        expActiv="[""Failure"",false,true] call BIS_fnc_endMission;";
        class Effects
        {
        };
      };
I don't usually use TIMEOUT but for some reason i did. However this trigger relates only to partisans and not to all players.




* and this one in case of victory

      class Item13
      {
        position[]={4945.522,139.98442,7212.0854};
        a=600;
        b=200;
        rectangular=1;
        activationBy="WEST";
        repeating=1;
        timeoutMin=10;
        timeoutMid=20;
        timeoutMax=30;
        age="UNKNOWN";
        text="end trigger";
        name="end";
        expCond="(part1 in thisList) and (part2 in thisList) and (part3 in thisList)";
        expActiv="[""Victory"",true,true] call BIS_fnc_endMission; playsound ""outro_music"";";
        class Effects
        {
        };
      };


I know is absurd but could be something related to the map?
What can kill all players? Is it possible a deletevehicle command to go bezerk and delete players?


Thoughts? cuz i'm numb.


Re: End trigger - Outlawz7 - 02-23-2015

Are "Failure" and "Victory" acceptable endings? I still use End1-6 just to be on the safe side.

https://community.bistudio.com/wiki/BIS_fnc_endMission

endName (Opional): String - end type, as used in endMission command (default: "end1")


Re: End trigger - Alwarren - 02-23-2015

You can name them as you like, the class name in description.ext is what counts.


Re: End trigger - Outlawz7 - 02-23-2015

(02-23-2015, 11:43 AM)Alwarren link Wrote:You can name them as you like, the class name in description.ext is what counts.


That is the class name?
https://community.bistudio.com/wiki/Debriefing


Re: End trigger - Alwarren - 02-23-2015

(02-23-2015, 12:03 PM)Outlawz7 link Wrote:That is the class name?
https://community.bistudio.com/wiki/Debriefing

Yeah, the class name in CfgDebriefing. You can finally give meaningful names instead of just End1, End2 etc.


Re: End trigger - Outlawz7 - 02-23-2015

Damnit, I thought all this time bis_fnc_endmission was just the endMission command with lipstick on it. So you can have more than 6 endings then?


Re: End trigger - Alwarren - 02-23-2015

(02-23-2015, 02:10 PM)Outlawz7 link Wrote:Damnit, I thought all this time bis_fnc_endmission was just the endMission command with lipstick on it. So you can have more than 6 endings then?

TBH, I am not entirely sure. For Multiplayer it will probably not make a difference, but it might be relevant for Campaigns.


Re: End trigger - Imperator - 02-25-2015

Quote:  expCond="(time>15) and ((!alive part1) or (!alive part2) or (!alive part3))";

Could it be related to your use of OR in the !alive checks?  If I'm reading that condition correctly then only one of your objects needs to die and the trigger will activate.


Re: End trigger - Outlawz7 - 02-25-2015

Yeah, but the point is none of them are dead.


Re: End trigger - alias - 02-25-2015

Yup, what Outlawz said.
However i removed all west units and placed them again, this time only vanilla stuff.


Maybe the mission.sqm was bugged.
Will see if this makes any difference.


Re: End trigger - Alwarren - 02-25-2015

(02-25-2015, 02:03 PM)alias link Wrote:However i removed all west units and placed them again, this time only vanilla stuff.

I still fail to see why you think it was due to CUP units.