Page 1 of 1

!alive and (optional) extra VIP

Posted: Mon Sep 09, 2013 4:13 am
by pvtbones
Hello all, working on a small adversarial mission, where indfor has to kill a VIP. I've got the victory trigger set up but I've run into a small issue. I want there to be a second optional VIP slot in case there's a couple extra players on the server. I can't seem to get the trigger to work for both scenarios (just the mandatory VIP or with the VIP + optional VIP) I can st it to one or the other and have it work. but I can't seem to figure out an way for both possibilities to be present within the mission trigger.

below is my trigger. perhaps I'm missing something stupid?

http://steamcommunity.com/sharedfiles/f ... =177088011

cheers

Re: !alive and (optional) extra VIP

Posted: Mon Sep 09, 2013 5:13 am
by Ferrard Carson
Sorry to say this, but the best course of action is to completely change the way you're attacking the problem. The tool is already out there for you to use. Declare a variable at the start that keeps track of the VIPs being alive or not, then Advanced CasCap the VIPs. Advanced CasCap, like the standard CasCap, checks the numbers in the specific groups as of 10-seconds after the start of the mission, then uses that as the baseline of 100%, therefore it doesn't break like !alive does when the unit in question doesn't exist. When the Advanced CasCap triggers, have it flip the variable you declared earlier to 0, and broadcast that value to players (make sure you do that one to synch everyone up). Then have an end trigger with condition "VIP == 0" that sends the command to the end controller.

unPBO the latest Rook Valley and take a look at the Advanced CasCap script in f/server to get an idea of what to do - I use it to keep track of the life of the pilots, because you get different endings to that mission if you complete it with or without surviving pilots. There are also elements in the mission file itself, and, IIRC, an element in init. in order to set the "PilotsDead" variable in the first place.

~ Ferrard

Re: !alive and (optional) extra VIP

Posted: Mon Sep 09, 2013 7:37 am
by harakka
Have the VIPs in the same group, then add "GrpVIP = group this;" into their unit inits in the editor. Then you can use the normal casualty cap script (http://ferstaberinde.com/f3/en//index.p ... alties_Cap) to end the game when all units from the VIP group are dead, this in init.sqf should do the trick:

Code: Select all

[["GrpVIP"],100,1] execVM "f\server\f_endOnCasualtiesCap.sqf";