104th_Crunch Posted June 4, 2010 Posted June 4, 2010 Setting a trigger to activate a client aircraft? Perhaps this is not possible? I setup a simple test mission: -1 Ka-50 that starts in the air -1 Ka-50 that is set to time hold 23 hours and start at Maykop. -1 Fuel Truck on the Maykop runway -1 trigger, Once / Unit Dead (Fuel Truck) / Activate Group (Client Ka-50) Sample mission attached The problem is that when selecting the Ka-50 that is supposed to be activated after the fuel truck is destroyed, it is not flyable. The screen just goes to airport view. Any help would be greatly appreciated please. Looking to use this function in our new mission. ThanksActivate Client Test.miz
Case Posted June 4, 2010 Posted June 4, 2010 Just to confirm that you are using the BS when selecting the Ka-50 slot? The number of times I have tried to join a mission in the Ka-50 from FC2 must be over a dozen now... There are only 10 types of people in the world: Those who understand binary, and those who don't.
Cp Posted June 4, 2010 Posted June 4, 2010 Got it to work. Switch the trigger type from "once" to "continuous action" (and remove the "message" unless you want to be spammed by messages :)) 1
104th_Crunch Posted June 4, 2010 Author Posted June 4, 2010 (edited) Thanks Cp! I do however need to send out a message when the unit is destoyed to let the clients know that the Ka-50s are available to use, only when the unit is destroyed. Any suggestions please? Nevermind, I think I got it. Setup a trigger for Flag to be true when unit dead, then a Once trigger for the message, and another Continuous trigger for the Ka-50 activation. Sweet, thanks again. Edited June 4, 2010 by Crunch
104th_Crunch Posted June 4, 2010 Author Posted June 4, 2010 lol, if you pick the unactivated Ka-50 then go back to spectators you get an explosion where the Ka-50 should spawn.
Case Posted June 4, 2010 Posted June 4, 2010 Thanks Cp! I do however need to send out a message when the unit is destoyed to let the clients know that the Ka-50s are available to use, only when the unit is destroyed. Any suggestions please?Use switched conditions and a flag to keep track of the state of the aircraft (taken or free). You may have to use another switched condition to reset the flag is the aircraft becomes free (unit dead). There are only 10 types of people in the world: Those who understand binary, and those who don't.
Cp Posted June 4, 2010 Posted June 4, 2010 (edited) lol, if you pick the unactivated Ka-50 then go back to spectators you get an explosion where the Ka-50 should spawn. You can fix that by creating a third trigger like this: (assuming you have a trigger that sets flag 1 to true once the truck is dead) CONTINUOUS ACTION () > FLAG IS FALSE (1) > DEACTIVATE GROUP (Activate Ka50) If you have more than one ka-50 group then just add them in actions. If you want to get all fancy you could create a trigger like this instead: SWITCHED CONDITION () > FLAG IS FALSE (1) - GROUP ALIVE (Activate ka50) > DEACTIVATE GROUP (Activate Ka50) - MESSAGE (You can not spawn in this ka-50 yet) This will do the same thing, but allows you to have a message telling the player why he cant spawn. downside is that you will need to create one of these triggers for every black shark group instead of packing all of them into one trigger like in the first example. Edited June 4, 2010 by Cp
104th_Crunch Posted June 5, 2010 Author Posted June 5, 2010 I need a bit more help please. For some reason on our dedicated, I cannot get the Ka-50s to activate. The triggers are setup like the example we were talking about. Here are the triggers I have. They are detailed in the four attached screens as well: Once () > Group Dead (US Tank Groupe #1), Group Dead (UKRAINE TOR Groupe #1) > Set Flag (10) Once () > Flag Is True (10) > Activate Group (Maykop Defense), Coalition Msg etc... Continuous Action () > Flag is True (10) > Activate Grop (_MAYK-Ka-50-01) etc... Continuous Action () > Flag is False (10) > Deactivate Grop (_MAYK-Ka-50-01) etc... The funny thing is, for testing, if I take the mission and reduce the units that initiate the trigger to just 1, then fly the mission locally as a server and destroy the units, everything works. Sample mission attached. THANKS1) 104th Operation Moonshield-2.miz
Cp Posted June 5, 2010 Posted June 5, 2010 I tested it (removed most units out of US tank group 1 to speed things up) and it worked fine, is it just the ka-50s that wont work after you have destroyed the two groups at maykop or does it not even activate the other groups defending maykop for the red once its taken? You could try setting the trigger that sets flag 10 to true to "continuous action" instead of "once" and see if that changes anything, I have no experience doing triggers for multiplayer missions so I don't know if it handles things diffrently.
104th_Crunch Posted June 5, 2010 Author Posted June 5, 2010 I tested it (removed most units out of US tank group 1 to speed things up) and it worked fine, is it just the ka-50s that wont work after you have destroyed the two groups at maykop or does it not even activate the other groups defending maykop for the red once its taken? You could try setting the trigger that sets flag 10 to true to "continuous action" instead of "once" and see if that changes anything, I have no experience doing triggers for multiplayer missions so I don't know if it handles things diffrently. Yes, it is just the Ka-50s not activating. The Red Maykop group and the next Blue group spawn fine. NOt sure what it is. I'll try your idea thanks again.
104th_Crunch Posted June 5, 2010 Author Posted June 5, 2010 You could try setting the trigger that sets flag 10 to true to "continuous action" instead of "once" and see if that changes anything... Tired this and still a no go on the server. I can't understand why...
Cp Posted June 5, 2010 Posted June 5, 2010 I did some testing, hosting the "activate client test" mission in FC2 and then joining with black shark and it didn't work. I'm afraid that the only one who can join in groups activated by triggers seems to be the one hosting the game. That, or you can't join ka-50 groups activated by triggers when the host is running FC2, I cant test which because I cant run two instances of black shark multiplayer at the same time. Is the 104th server running FC2 or black shark?
104th_Crunch Posted June 5, 2010 Author Posted June 5, 2010 (edited) Your conclusion is what I was thinking as well. The 104th are using FC2 to host. So, on the server I went to join and spawn at Maykop after the trigger was activated, and it did not work lol of course. We can try hosting it with DCS:BS to see if it works. Again, thanks for all your efforts! Edited June 5, 2010 by Crunch
104th_Crunch Posted June 5, 2010 Author Posted June 5, 2010 Tried hosting the mission with DCS. As the host I was able to spawn at Maykop, but 104Kdt_Goat connected as a client and was unable to join in at Maykop Ka-50. Crap! I guess it is back to the drawing board to redesign the mission and remove the base take over feature :(
Grimes Posted June 7, 2010 Posted June 7, 2010 Heh, sorry I've been away from the computer abit, so I'm just now reading this. And I can't test/build anything yet as my laptop only has BS 1.0.1 on it. Have you tried this with NON-Ka50s? Like A-10s or Flankers? I tested activation of client aircraft in FC2.0 for the purpose of giving both sides a finite and real number of airframes to use. The idea was to make it so if the F15 with tail number 711 was shot down, nobody could fly it because it was "destroyed." I never went back to test it with either patch that was released later or with Black Shark. So there is a chance that some of this info might not be 100% accurate. I had set a client aircraft with a long delay and attempted to join in that slot. My aircraft spawned and I was able to rearm and such as the airbase belonged to the coalition (because they spawn there) I later added a deactivate trigger based on certain conditions for whether or not the aircraft was "destroyed" or not. A problem is each time a player hits fly with a client aircraft selected it essentially acts as an activate group type trigger. And using a trigger to activate a client aircraft essentially doesn't do anything. To be honest I'm quite sure that functionality is completely disabled or just really screws the system up. So all client aircraft are available at the start of the game no matter what delay settings you apply. There is no *good* way to activate client aircraft. I suppose the best option you have is be an ass about it via mission triggers. WHEN Unit inside zone AND flag 1 is true THEN deactivate unit AND display message "I'm sorry you can't use this yet" So when they spawn there they get kicked back out to the aircraft selection menu... if they are not supposed to be flying it. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
104th_Crunch Posted June 7, 2010 Author Posted June 7, 2010 Mighty nice of you to give some help Grimes. Thank you very much. I'll see what I can do with your ideas and report back.
Grimes Posted June 7, 2010 Posted June 7, 2010 well I would have chimed in much earlier..... but Ive been slightly drunk this entire weekend and been thoroughly enjoying <govenator voice> California</governator voice>. I saw the post last night but decided not to comment, as I would have been incredibly influence by a heavy mixture of craft beer and todays soup of the day..... whiskey. but yeah. best of luck. Not sure why everyone has a fancy for using maykop has the absolute best air base to capture. I suppose it has to do with it being the only AB that is somewhat solitary from the rest of the bases. At any rate I hope ze ideas I put forward help you in some way. Things within the game get severely obnoxious when you have different coalitions spawn at the same airbase or dealing with allowed player spawns. Cyphering such rules and conditions the game forces on us is an annoying task. I must admit though that FC2's inclusion of the coalition ownership flag (red or blue) has helped immensely. Without it I would not have realized that when both coalitions have aircraft taking off from the same airfield that it defaults to blue ownership. My advice. Keep things neutral unless either side has their own exclusive airbase to capture and spawn from. Otherwise you have a headache the size of Saskatchewan to deal with. 1 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Xjikz Posted June 9, 2010 Posted June 9, 2010 WHEN Unit inside zone AND flag 1 is true THEN deactivate unit AND display message "I'm sorry you can't use this yet" Does deactivating a playable unit work when a player is using it ? Sould I set : ONCE : MISSION START then FLAG 1 = TRUE CONTINUOUS : WHEN KA-50 is inside zone (around airport) and FLAG 1 = TRUE then deactivate KA-50 ? CONTINUOUS : WHEN EnnemyTunguskaOnAirport IS DEAD then Set FLAG 1 = FALSE Will this work ? Proud to be a [sIGPIC][/sIGPIC] :joystick::pilotfly::book:
nemises Posted June 10, 2010 Posted June 10, 2010 The only issue with that (were it to work) is that, since you have possibly deactivated the unit, it cannot be activated again as per the original issue. I strongly suspect you cannot Activate / Deactivate clients (I remember testing this out in 1.01 , and I didnt see any changes to this in the 1.02 release notes) Crunch, could it be achieved in this way...? - The Client units to be "activated" must be on a FARP and not an airfield - Set front condition / switch trigger (if client x in zone AND flag y THEN message"..not yet avazilable") - Client set to 0% fuel and no weapons loadout - On "activation", actually only activate refuelling and re-arming units around the farp, and unset flag Y In this way, the units can be spawned in at any time, but can only be started and flown when "available"..... client will haveto fuel up and arm. not very clean, but a possiblity. Problem with using an airfield, is that all services (fuel, Ammo, radios) are automatically available.
Case Posted June 10, 2010 Posted June 10, 2010 Problem with using an airfield, is that all services (fuel, Ammo, radios) are automatically available.The problem here is not the airfield, because you can blow up the control towers and make sure there are no command post units around. The problem is that as soon as there is a take off or landing waypoint set at that airfield, clients will be able to rearm/refuel there regardless of the presence of control towers and/or command post units. There are only 10 types of people in the world: Those who understand binary, and those who don't.
nomdeplume Posted June 10, 2010 Posted June 10, 2010 Do aircraft faults work in multiplayer? If so you could perhaps disable the engines continuously until the flag to make the aircraft available is set.
Case Posted June 10, 2010 Posted June 10, 2010 Do aircraft faults work in multiplayer? If so you could perhaps disable the engines continuously until the flag to make the aircraft available is set.Unfortunately they do not. You can explode a unit though, but that is probably not what you would want as a server admin. There are only 10 types of people in the world: Those who understand binary, and those who don't.
Grimes Posted June 10, 2010 Posted June 10, 2010 For the life of me I can't figure out exactly what you are trying to do and why it must be so hard. Then it hit me, it isn't hard, you are just blatantly ignoring two critical facts. 1. The mission doesn't activate a client aircraft. The client does. 2. The client deactivates their own client aircraft.... but the mission can also. So I believe your solution is a whopping 1 trigger per aircraft and 1 trigger to change a rule. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Recommended Posts