Karlos Posted December 13, 2021 Posted December 13, 2021 Hi everyone, I wanted to create a duel mission, using DCS-SimpleSlotBlock SSB by Ciribob or Mist, specifically, to make sure that only one player can enter a certain area at a time, while the others are blocked, the zone becomes free again when someone inside disconnects or leaves the "back to Spectators", is it possible? suggestions? Thanks for the attention
cfrag Posted December 14, 2021 Posted December 14, 2021 Yes. You need to install SSB on the server, and then run a script in the mission that checks if a plane is inside the area (Trigger Zone) that you want to be exclusive. If a plane is in there, you'll set the flags that help SSB to determine which slots to block. No Mist required.
Karlos Posted December 14, 2021 Author Posted December 14, 2021 thanks for getting back to me so quickly. But I think more complex than that example: 4 different airplanes to choose from, same exact battle zone. a player chooses a plane, then occupies a slot, I would like other players not to be able to choose the remaining free slots of the same coalition until the first player exits that particular slot / area. I don't know if I was able to explain I enclose a test mission. SSB.miz
cfrag Posted December 15, 2021 Posted December 15, 2021 (edited) In that case it's even easier, no zones required. The test condition to exclude planes is if another plane of the same color already exists in-game. So, for blue, simply have a repeating (once a second should suffice) task to check if any blue plane isExist() (iterate all blue player planes, see if anyone exists), and close all other blue slots if so. Do the same with the red slots. When no blue plane exists anymore, open all slots again. Same with red. Perhaps look at this to see how individual planes can be blocked by the current game situation. Method setSlotAccessByAirfieldOwner() is the interesting one. Edited December 15, 2021 by cfrag
Karlos Posted December 15, 2021 Author Posted December 15, 2021 11 ore fa, cfrag ha scritto: no zones required on that test mission I only had one zone, but my goal is to use at least 2 distinct areas I'm fasted from scripting and editing missions,so i'm walking in the dark check if I am getting closer or further away from my goal,thanks Test.miz
cfrag Posted December 16, 2021 Posted December 16, 2021 That looks good to me, with a few points to explore: SSB can (and defaults to) kick players whose plane's ID is set to 100. If you set all planes to 100 without disabling kicking, the player who just entered will be kicked You probably want a method to reset the blocks to 0 once the duel is over Cheers, -ch
Karlos Posted December 16, 2021 Author Posted December 16, 2021 Thanks for reply 1. -- New addon version 1.1 -- kicking of players. ssb.kickPlayers = false -- Change to false if you want to disable to kick players. ssb.kickTimeInterval = 1 -- Change the amount of seconds if you want to shorten the interval time or make the interval time longer. ssb.kickReset = false -- The slot will be automatically reset to open, after kicking the player. ssb.kickTimePrev = 0 -- leave this untouched! correct? 2.mission attached I have this error Test2.miz
cfrag Posted December 17, 2021 Posted December 17, 2021 (edited) The SSB script looks correct to me. I do not get the error you are seeing in the mission that you attached. Edited December 17, 2021 by cfrag
Karlos Posted December 17, 2021 Author Posted December 17, 2021 but have you tried the mission? I have tried but the slots don't freeze and then I get this error message. I'm in full crisis haha I looked in the forum, I saw your parachute script Interesting. if there was the possibility to drop the parachute immediately after the ejection it would be great
cfrag Posted December 18, 2021 Posted December 18, 2021 (edited) I looked more closely. There's an invisible control character in the P-51B's set user flag action (open the mission source itself in a text editor to see it more clearly). Simply deleting and redoing that DOSCRIPT in ME, will make the error goes away. Additionally, I recommend that you activate SSB on "MISSION START (no condition)" instead of "ONCE after one second", as after one second is too late to catch the spawning first plane if you start the mission after having spawned. Also be advised that any SSB functionality cannot be tested in single-player. Cheers, -ch Edited December 18, 2021 by cfrag
Karlos Posted December 18, 2021 Author Posted December 18, 2021 ohhh ok fixed the error message, thanks but the mission doesn't work, the block only works once, then all players can enter the area Where am I doing wrong? i am using stable version, not open beta Test3.miz
cfrag Posted December 19, 2021 Posted December 19, 2021 (edited) 13 hours ago, Karlos said: but the mission doesn't work Well I guess that's easily explained - you trigger each action on flag 1 and flag 2 transitioning to true (on), and you never reset them. Once set, they remain set to true/on. So after a short while both flag 1 and 2 are true. The second transition (flag 2--> true) enables all planes. I don't think that is entirely what you intended, but a good part of it . So you are not quite done yet, but are good half way done. Edited December 19, 2021 by cfrag
Karlos Posted December 20, 2021 Author Posted December 20, 2021 I thought about doing: "switched condition" "if flag 1 true flag 2 Off ---- if flag 2 true flag 1 off! I have no other ideas on what to do and what not to do. it seems to work but there are some small problems / "bugs" if a player chooses a slot, he accesses the "briefing" screen but does not click on "fly" another player can sit on the remaining slots and fly, while the player who has not clicked on "fly" by clicking flies quietly together with the other player or if a player occupies a slot, the plane crashes and crashes, another player can sit down. f14 problem, two pilots anyway, everything I'm doing using flags and trigger zones, etc, can be translated into one script? I thank you in advance
cfrag Posted December 21, 2021 Posted December 21, 2021 12 hours ago, Karlos said: I thought about doing: "switched condition" "if flag 1 true flag 2 Off ---- if flag 2 true flag 1 off! I guess the easiest way to do it is when you set the SSB flags, also re-set the opposite flag, so that condition is always ready to fire 12 hours ago, Karlos said: if a player chooses a slot, he accesses the "briefing" screen but does not click on "fly" another player can sit on the remaining slots and fly That looks like the way DCS works. The plane slot that you occupy in briefing does not cause the plane to spawn until you click fly. So that slot won't be blocked. And since you disabled kicking (which would happen once the second plane enters the game) this is a 'correct' result of how DCS is designed (but not desirable from you point of view). A more robust method could be re-enabling kicking, and create a trigger for each plane that disables all other planes once it enters the game (with re-enabling all once the plane leaves. Note that this would only require a single action since only one can be in) 12 hours ago, Karlos said: f14 problem, two pilots It may not be a big problem - have you tried, and with what result? RIO and other crew slots usually do not count as pilots in DCS, and slot blocking may not apply. Worst case: the pilot must stay in briefing until their crew is slotted 12 hours ago, Karlos said: anyway, everything I'm doing using flags and trigger zones, etc, can be translated into one script? Yes. And it could exponentially increase your options. And it's much more fun anyway
Karlos Posted December 21, 2021 Author Posted December 21, 2021 i'm working on it, but i'm at a standstill right now, i'm approaching one side and walking away from another. try to control this messy mission. ...if there was an implentemation inside the dcs editor "trigger zone" max 1 player https://www.youtube.com/watch?v=7ck0QVCSSEs 2' 40'' Test4.miz
Solution cfrag Posted December 22, 2021 Solution Posted December 22, 2021 (edited) So what is the issue with above mission? 9 hours ago, Karlos said: i'm at a standstill right now, i'm approaching one side and walking away from another In cases like this, I try to stop and take a step back; usually, I've made some erroneous assumptions, try to keep holding onto some design that's wrong, or conflated some things that are actually distinct. I then write down what I want and why. Perhaps it would help if you explained why you need those zones at all, and how they figure in your decision making. What is their purpose? If you only need it to detect if a unit exists in the game, perhaps another condition like "Unit Alive" may work better for you? It may help to write down the conditions under which a unit becomes blocked, and under which a unit becomes free to enter. These transitions in states (blocked-->unblocked, unblocked-->blocked) usually follow clearly definable events, and the events are often what you are looking for. They are the conditions to encode in triggers. Edited December 22, 2021 by cfrag
cfrag Posted December 22, 2021 Posted December 22, 2021 9 hours ago, Karlos said: https://www.youtube.com/watch?v=7ck0QVCSSEs 2' 40'' Yeah, Cap's a great guy, but unfortunately can't code their way out of a wet paper bag - those attributes are great for anyone who uses scripting (if you look at some of the missions I've posted you see that I make heavy use of attributes added to zones to automate lots of different things). They aren't accessible in ME right now, so disregard them for now. Once (probably soon) you progress to Lua scripting, you may find them incredibly helpful.
Karlos Posted January 9, 2022 Author Posted January 9, 2022 (edited) i visited a server called Just Dogfight I believe it uses Ciribob SSB script and does the same thing that I look for in my mission I also did a test with a friend of mine and even if a person chooses a slot, even without physically occupying it with a plane so by not clicking on "Fly" the other players cannot enter the area...so now I know for sure that it is doable I forgot,happy new year Edited January 9, 2022 by Karlos
Karlos Posted January 9, 2022 Author Posted January 9, 2022 (edited) Il 22/12/2021 at 10:18, cfrag ha scritto: I then write down what I want and why. Perhaps it would help if you explained why you need those zones at all, and how they figure in your decision making. What is their purpose? If you only need it to detect if a unit exists in the game, perhaps another condition like "Unit Alive" may work better for you? for a matter of order of the slots and not to create too many areas fight in the same area using different planes, with the same geographical area for duels with the same geographical characteristics and therefore with the same difficulties for each player Edited January 9, 2022 by Karlos
cfrag Posted January 9, 2022 Posted January 9, 2022 (edited) 11 hours ago, Karlos said: for a matter of order of the slots and not to create too many areas My apologies for being unclear. To block the slots you need SSB, I understand that. My question was: what do we need the trigger zones for? From what I saw in the mission and your descriptions, I deducted that the zones were used to block other planes from spawning (and only spawning) when one was alive in the game. For that, no zone is required. Unless I'm mistaken, a simple trigger with Group Alive should do the same. That's what I meant when I wrote that it helps to try and enumerate the conditions that we need to put this into reality. Now, what you wrote above gave me additional ideas - that perhaps we'd want to kick a plane if it's outside their designated duel area - then yes, we definitely would need zones. That's why we need all relevant conditions written down before we embark on putting them into a mission - it makes is so much easier. Let me try to put this down to illustrate: So far, as I understand, the conditions are We have different Sets of planes (SSB supports only group blocking, not unit blocking, so all player planes have to be single-unit groups. I'll avoid to use 'group' as a term here because it could be confusing). Let's say we have four of these sets, two each for red and blue: call them sets R1, R2, B1 and B2. We start with all slots open for all sets If one plane of a set (e.g., B1) is alive/active in the game, block all other planes/slots for that set (B1) - except the one that's in the game (this would kick the player, an SSB setting). This prevents unfair duels with more than one opponents and keeps the one player in the game. If no plane of a set is active, enable *all* planes in that set. This re-enables all planes in that set after a player is removed from the duel by any means. With above rules, only one plane of sets B1, B2, R1 and R2 can ever exist in a game at the same time (a maximum of four planes: one each per set), and I believe that was the original idea. Above rules make no assumptions about where the planes are, blocking is determined exclusively by the set each plane belongs to. Now, you gave me the idea that we can try and add additional rules for better balance: Planes of sets B1 should only engage R1, and B2 only R2. No cross-set duels. No plane must ever be allowed to leave their allotted "arena" space: say planes of R1, B1 must remain in arena Z1, and R2, B2 in arena Z2. If a plane leaves their arena, that player is kicked, and the plane returned to the empty slots Maybe we should warn planes when they are about to leave their arena That is where zones could come into play. it would disallow a plane running from the engagement, or a plane from one duel zone coming to the aid or disrupting another duel. Does this help? Edited January 9, 2022 by cfrag
Karlos Posted January 16, 2022 Author Posted January 16, 2022 I did not know that SSB could not use units to block every single plane, in fact in my previous mission I believe, I used units and they did not work,so thank you! I also thank you for your infinite patience I have modified the mission based on your suggestions, and yes, the zones are not necessary unless you want someone to enter or leave the zone. But they are useful to speed up some processes of the dcs mission editor! Especially if you have several areas close together without interfering with others. I enclose a younorn mission: everything is fine but .... In this example, when one player chooses a plane and then destroys it, other players can take the slots same thing with regard to when a player chooses a slot and does not click on "briefieng / fly" ! As I wrote to you in the previous message, in the just dogfight server, for example, if you enter a slot and do not press the "fly" button under no circumstances will the players be unable to sit down. how is it possible? I am very close I know, but it only takes a moment to get far away. So I'm stalled! Test44.miz
cfrag Posted January 16, 2022 Posted January 16, 2022 (edited) That mission looks good to me, with some (unintentional?) possible side effects. So let's see if I understand everything correctly. I'll walk through as the blue F-15 (I'm ignoring area 2): mission starts, ssb is enabled, all slots are set to 0 by default, all slots are enabled switched trigger "all of group outside" fires for all groups including 15B, setting all slots to 0 (multiple times), triggers remain in fired condition I choose f15blue, and enter game inside area 1 group alive f15b fires, blocking all other slots, and kicking them if they are for some reason in the game (should not happen). No other blue plane now can enter. Good. (every second above group alive f15b fires, blocking all other planes - probably overkill) switched trigger all group outside resets for F15blue (all others remain 'fired') (time passes, every second overkill "group alive f15" fires, setting all other planes to 100) eventually, my f15 is killed after running out of fuel (I am the dominator! ) ON PILOT DEAD - group dead fires for f15, setting all other planes (except f15) to 100, blocking them. all of group outside fires for f15, setting all planes to 0, enabling them all -- warning: possible race condition with PILOT DEAD dead above At this point all slots are open. Is this intentional? I haven't tried this, but I still may occupy this slot as a player although I'm not in the game. Not very consequential, as as soon as someone else enters the game, all others get kicked So, in theory it should work. The group alive repetitive could probably be a switched condition, but that's not a factor. 8 hours ago, Karlos said: when one player chooses a plane and then destroys it, other players can take the slots Yes, because group outside fired and set all slots to 0. Since a dead plane isn't in the game, the other slots don't get blocked (the trigger that blocks is 'group alive', and my f15 group is dead as a doornail) 8 hours ago, Karlos said: if you enter a slot and do not press the "fly" button under no circumstances will the players be unable to sit down That makes sense (from a DCS perspective) since a group only is considered alive when a 'living' unit is in the group. Unless you press 'fly', that slot does not represent a live unit in the game. Before, it's not alive, and no blocking occurs on account of someone merely having chosen a slot but not being in the game. That's the way DCS works, and can't be easily remedied. Now, I agree that this is a bit inelegant, but hopefully that isn't a show stop There is one scenario you may want to look at, though: What happens, when I take the F15 outside of area 1? Is that intentional? Edited January 16, 2022 by cfrag
Karlos Posted January 21, 2022 Author Posted January 21, 2022 Il 16/1/2022 at 13:40, cfrag ha scritto: That makes sense (from a DCS perspective) since a group only is considered alive when a 'living' unit is in the group. Unless you press 'fly', that slot does not represent a live unit in the game. Before, it's not alive, and no blocking occurs on account of someone merely having chosen a slot but not being in the game. That's the way DCS works, and can't be easily remedied But it is possible, as I wrote you in the previous message in the server ---JustDogfight--- it is possible to do this. Il 16/1/2022 at 13:40, cfrag ha scritto: There is one scenario you may want to look at, though: What happens, when I take the F15 outside of area 1? Is that intentional? yes for now I am not worried about this aspect, I solved it by blowing up the units outside of area 1 with the attached mission. Il 16/1/2022 at 13:40, cfrag ha scritto: Yes, because group outside fired and set all slots to 0. Since a dead plane isn't in the game, the other slots don't get blocked (the trigger that blocks is 'group alive', and my f15 group is dead as a doornail) OK but how do I fix this? Il 16/1/2022 at 13:40, cfrag ha scritto: At this point all slots are open. Is this intentional? I haven't tried this, but I still may occupy this slot as a player although I'm not in the game. Not very consequential, as as soon as someone else enters the game, all others get kicked somehow I have to reset the value to zero for all planes Il 16/1/2022 at 13:40, cfrag ha scritto: I'll walk through as the blue F-15 (I'm ignoring area 2) yes for the moment the different areas and the red coalitions I am not taking into consideration, only zone 1 and the blue coalition as you will see in this mission, i am not using flags, i guess all the work can be done even without Test5.miz Thanks for the attention
cfrag Posted January 21, 2022 Posted January 21, 2022 1 hour ago, Karlos said: But it is possible, as I wrote you in the previous message in the server ---JustDogfight--- it is possible to do this. Yes, I was saying that under the assumption that you do not want to write your own server-based code (i.e. modify the excellent SSB script). My apologies for not making that clear. Blocking slots as soon as they are selected on the server (before clicking on 'Fly') *is* possible, but not from the mission side. That has to be done server-side. 1 hour ago, Karlos said: OK but how do I fix this? That, too, is inherently how your mission and SSB work together. If you need to retain a player's plane until they actively select a different slot, you would need to alter the server side (SSB or your own slot blocking script) 1 hour ago, Karlos said: as you will see in this mission, i am not using flags, i guess all the work can be done even without I'm looking forward to look at the mission over the week-end.
Karlos Posted January 22, 2022 Author Posted January 22, 2022 10 ore fa, cfrag ha scritto: Blocking slots as soon as they are selected on the server (before clicking on 'Fly') *is* possible, but not from the mission side. That has to be done server-side. this comforts me at least I don't keep banging my head in the mission editor and getting nothing out of it although I have no idea how the server can have a say in all of this. how to group 4 planes locked into one SSB script? because if I use "do script" for each single plane they don't stop simultaneously, but at a distance of one second from the other and sequentially, according to the order I gave in the mission editor. this is one of the problems i encountered i don't know if a single script can solve it or not. 10 ore fa, cfrag ha scritto: I'm looking forward to look at the mission over the week-end. forget it I am one step away from abandoning, in the meantime I thank you for bringing me up to here.
Recommended Posts