Bahger Posted April 18, 2013 Posted April 18, 2013 There are four client flights altogether, organised in pairs so that when the player selects one client flight, the other will spawn as an AI flight. I've used a combination of triggers to ensure that when a player takes a client flight, the identially-tasked AI flight will not spawn as well. However, something is going wrong, and when I take, say, Ford flight, its AI version launches a little later. I'm sure this is to do with the combination of "late activation" and "uncontrolled" I've used to get all the right flights to appear on the ramp at mission start (i.e. always only two flights max, in any combo of client and AI) but there is obviously a logic glitch that I cannot pin down. If I have to use "activate" alone to control this problem, I will, but I'd rather have the right flights show up at the start of the mission, then start up when "uncontrolled" is superseded by a triggered action. Could someone possibly take a look? The solution is probably very simple but I cannot figure it out. As always, thanks!TF_Snow_Leopard_SP_Beta.miz
ENO Posted April 18, 2013 Posted April 18, 2013 (edited) Eh man... all I'm seeing is that those other flights will spawn when you leave the zone... What it looks like you're trying to do is show that when your flight isn't in the zone... the flight will spawn. But what is happening is you are first IN the zone- then you take off with your flight and you're leaving the zone... which ostensibly makes the AI flight take off "a short time after." I'm willing to wager that happens right when your flight leaves your "spawn" zone. I think you need to do it so that when you originally get "unit in zone" that you set a flag (1) as true. Then when you want to trigger or not trigger your AI backup, then you can do "unit out of zone" and "flag (1) false." That way the logic system knows that your flight spawned and that it doesn't need to spawn your backup. Or... if it did spawn, it knows that it did and won't spawn because one of the conditions has not been met. Looks like you're missing that one flag activation, and that used as a condition for the spawn trigger. Edited April 18, 2013 by ENO "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Bahger Posted April 18, 2013 Author Posted April 18, 2013 (edited) Thanks, Eno. I bet you're right. Maybe it will work if I make the spawn zone cover the entire map area. Spawn when the equivalent flight is not in zone is useful because if a client flight is not taken by a player, it's counted as not in zone at mission start, and the AI version therefore appears. Edited April 18, 2013 by Bahger
ENO Posted April 18, 2013 Posted April 18, 2013 That could work too I think... let me know which way you go with it! "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
msalama Posted April 19, 2013 Posted April 19, 2013 (edited) This seems to work, just used it in a mission last week: 1) MISSION START -> FLAG ON (1) 2) ONCE -> UNIT ALIVE (Player's flight) -> FLAG OFF (1) 3) ONCE -> TIME MORE (Seconds) && FLAG IS TRUE (1) -> AI TASK (Ai flight start) So what you do is you initialize a flag and turn it off if someone occupies a flight. However, if this flight is still unoccupied after a certain time, the 3rd phase test passes and an AI substitute is started - although nothing actually prevents a client selecting said flight later. Is that acceptable to you? Edited April 19, 2013 by msalama The DCS Mi-8MTV2. The best aviational BBW experience you could ever dream of.
Bahger Posted April 19, 2013 Author Posted April 19, 2013 Yes, that's a good solution, msalama, especially for MP. Bear in mind that the "unit alive" trigger is not strictly necessary as, if a player does not select a client flight, that flight does not exist at mission start, so you can use a trigger zone to assess which flights exist and spawn an AI ringer for any flight which does not. My mistake was to make a trigger zone that a flight could exit, thereby telling the sim that it no longer existed and triggering the redundant AI flight. My assumption had been that a "once" trigger would only check once, but apparently not, if the condition gets reversed, it will declare a previously true condition untrue. Since giving the "spawn AI" trigger zone a radius of 250000, I've had no problems!
Recommended Posts