-
Posts
19 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by 74DELTA
-
Just wanted to share, and maybe this is simple, and everyone else already knows how to do this but I thought it was kind of cool and wanted to share with the community. A very scalable framework using Moose to create menu items that call functions to spawn or destroy units, ergo allowing users to select a mission, play the mission and repeat if they want to run it again. Using Moose I created missions that can be selected off of the Comms>Other menu. These missions are able to be executed over and over again by your users, as well as being reset in the event a unit or something gets hung up and you want to basically terminate, or reset the mission to run it again. Resetting is not necessary but can be handy. Works with dynamic or static spawned players. The script below will show ground missions, an air based missions and menu items to spawn enemy aircraft to practice air to air engagements. This is extremely scalable and customizable. If you know how to make Moose play a sound I would love to know as I tried a number of different ways to play my OGGs and could not get it to work so used time and triggers in ME to play my sound files. AND, if you know how to make that happen ONLY to the person who selects the menu item that would be amazing. And as always, if you have a better way, or alternate ideas please share. Thanks. First, we create the main menu item, Then we create a sub-menu item under that. Then we create a menu item under that which calls a function. Of course you need units in the ME for the functions to call. Mission Menu Sample.lua
-
- 2
-
-
I'm working on a repeatable mission system using a radio item set flag to trigger a Moose script that spawns assets. Here's how the system works: The mission allows players to use the comms menu to select a mission, which will spawn a set of assets that they can interact with. Once the mission is completed (either successfully or failed), the flags are reset, and the mission is available again for users to select from the comms menu. Players can then try the mission again. This part is working as expected. The issue I'm working on: The spawned units are generated by a Moose script from a pool of assets and zones. For example, a group that gets spawned from a template like "B17escort" in the Mission Editor (ME) will appear as "B17escort#001". I want to create a Moose script that will play a sound for human players whenever a specific group (e.g., "B17escort#001") enters a defined trigger zone, and the players are in a different trigger zone. This way, players flying near the assets will hear a sound cue, providing them with more dynamic interactions. The logic I have in mind looks something like this: Define Zone 1: A trigger zone where the spawned asset (e.g., B17escort#001) will pass through. Define Zone 2: A trigger zone where human players might enter. Track the Spawned Group: As the "B17escort#001" group enters Zone 1, I want to grab its group ID for later use. Track the Human Player Groups: Players will be in Zone 2, I want to identify their group IDs. Since there might be multiple player groups in this zone, I need a way to capture and store all of them. Condition: If the spawned group (e.g., "B17escort#001") is in Zone 1, and any player group is in Zone 2, I want to play a sound to all players in Zone 2. The problem I'm facing: I'm struggling to figure out how to dynamically identify the group names of both the spawned asset and the players as they enter their respective zones. I’m also not sure how to trigger a sound specifically for the players in Zone 2 when the conditions are met. Here’s a rough idea of how I think the script could work: Define the zones by name (Zone1 for the B17escort#001 and Zone2 for players). Check for group entry into Zone1 for the spawned asset and into Zone2 for the players. Trigger the sound: If the asset enters Zone1 and the players are in Zone2, trigger a sound event for those players. I would greatly appreciate any help, suggestions, or examples from the community on how to achieve this in DCS scripting. Specifically, I’m looking for guidance on: How to dynamically capture the group IDs when units (both players and assets) enter trigger zones. The best way to play a sound to players when a certain condition is met. General advice on improving this script to work reliably with Moose. Thanks in advance for any help! Current spawn script is ; -- ----- B17 Escort Mission ------------------------------------------------------------------------------------------------------------- MissionAssetTable1 = { "B17escort", "B17escort-1" } MissionZoneTable1 = { ZONE:New( "B17zone1" ), ZONE:New( "B17zone2" )} Spawn_Vehicle_1 = SPAWN:New( "B17escort" ) :InitLimit( 4, 0 ) -- :InitRandomizeRoute( 1, 1, 100 ) :InitRandomizeZones( MissionZoneTable1 ) :InitRandomizeTemplate( MissionAssetTable1 ) :SpawnScheduled( 60, .2 )
-
It's working now. operational code below if anyone is interested. thanks. Mission Trigger to set main root menu sub under Other, "Active Missions" subR = missionCommands.addSubMenu('Active Missions') Using the "Perform Command">"Run Script" on the asset when it spawns to create a mission entry under the Active Missions submenu subN1 = missionCommands.addSubMenu('Strike at Saipan', subR) subNN2 = missionCommands.addSubMenu('BTR80 Spotted near Saipan', subN1) On unit death using a ME trigger, missionCommands.removeItem(subN1) works as intended.
-
Thank you for the suggestion, still no Joy. appreciate your input though.
-
HI all you Mist/Moose Gurus! With something so easy I hate to admit that I have been struggling but it's time to reach out and ask for help. I am making a weekend mission for my peeps and the current problem is to dynamically modify the F10/Radio menu as units are spawned and killed. I am more of a Moose guy but this is shaping up using Mist. I have both languages loaded in this *.MIZ so open to any solution and of course if there is a better way to do this I am all ears. Scenario is this; Summary Request Enemy unit spawns and this creates a Radio (F10) SubMenu Item under "Other>Active Missions", as a new line of text, no functions or commands, basic. When the target is killed the radio menu text is removed. Status I have been successful using Mist to create my global submenu under "Other" as "Active Missions", and to create the submenu and text under that as units spawn to the map, but cannot find a way to have them removed when the unit is killed. Currently when an enemy is spawned, I can generate the following, as an example; F10>Other>Active Missions>Strike at Saipan>BMP Spotted at Saipan!. I Cannot seem to remove it once the unit is dead. I can get it to remove the top level (Active Missions) and down, but that is no bueno. Technical I create the main submenu under "Other" like so; subR = missionCommands.addSubMenu('Active Missions') When a unit spawns, I create the following Submenu and text string under the submenu like so; subN1 = missionCommands.addSubMenu('Strike at Saipan', subR) subNN2 = missionCommands.addSubMenu('BTR80 Spotted near Saipan', subN1) Problem Abstract; I've used Moose, DCS ME and Mist to try and remove the "Strike at Saipan" level menu item and below when the unit is killed and there is no joy. Examples; Radio Item Remove missionCommands.removeSubMenu('Strike at Saipan', subR) missionCommands.removeItem('Strike at Saipan', subR) MENU_MISSION:Remove('Strike at Saipan', 'BTR80 Spotted near Saipan') And others variations of similar strings of code. Thanks for any guidance on this.
-
hmmm. good thoughts on the parking. oh well, was hoping for spawn any any everywhere. thanks!
-
DCS-SimpleSlotBlock - Multiplayer Slot Blocking Script
74DELTA replied to Ciribob's topic in Scripting Tips, Tricks & Issues
Fair point, but in this case it was user error because the instructions were not clear to me. my trigger in ME only had the trigger.action.setuserflag ("groupname", 0). As soon as I figured out that I needed to set flags to 100 to prevent the spawning it worked fine. added the line trigger.action.setUserFlag("HELI2",100) to that same trigger and it works as designed. Also after some digging, the file "SimpleSlotBlockGameGui.lua" needs to be in the \scripts\hooks\ path to work. Not the "\scripts" folder. -
Just tying to verify if i am messing up something, or if this is by design - not all airfields can dynamically spawn all aircraft regardless of "Full Info" setting all aircraft as available? that seems to be the case across the Persian Gulf map anyway. And seeing similar results with FARPs in that they are not even showing the OH58D(R) as available in the dynamic spawn selection. Kind of useless for Sandboxing if you can't have ALL platforms available for your users?
-
DCS-SimpleSlotBlock - Multiplayer Slot Blocking Script
74DELTA replied to Ciribob's topic in Scripting Tips, Tricks & Issues
Anyone have luck with this since the Dynamic Spawn Patch last month? Not making any progress. It does work. figured it out. Thanks again Ciribob for another amazing script! you are incredible. -
(last resort) DCS Dedicated Server Setup
74DELTA replied to AoS_Nexus's topic in Multiplayer Server Administration
on most SOHO/Home routers, if you setup a DMZ it's not going to work. simply turn on port forwarding for TCP/UDP port 10308 to your internal (RFC 1918) address such as 192.168.x.x/10.x.x.x hosting your DCS server and you should be golden. And no disrespect, and don't take this the wrong way but in my experiences with getting this to work through a TPLink router is problematic at best. May I suggest an ASUS edge router. Take that for what it's worth though, we all have our thing.- 15 replies
-
- dedicated server
- server admin
-
(and 1 more)
Tagged with:
-
Text to specific players in zone
74DELTA replied to 74DELTA's topic in Scripting Tips, Tricks & Issues
Follow up question for you scripting Gods. Will the following structure work to send a different text message to the individual for each different group killed. Not sure how to build that structure properly, but hopefully it's close enough to understand my intent. Thanks. local u = mist.getUnitsInZones(mist.makeUnitTable({'[all]'}), {'alphatriggerzone'}) for i = 1, #u do local _uName = Unit.getName(u[i]) if (Group.getByName('Mig1') and Group.getByName('Mig1'):getSize() < 1) or not Group.getByName('Mig1') then trigger.action.outText("Good Kill ".. _uName, 2, false) else (Group.getByName('Mig2') and Group.getByName('Mig2'):getSize() < 1) or not Group.getByName('Mig1') then trigger.action.outText("Well Done ".. _uName, 2, false) else (Group.getByName('Mig3') and Group.getByName('Mig3'):getSize() < 1) or not Group.getByName('Mig1') then trigger.action.outText("Almost There ".. _uName, 2, false) else (Group.getByName('Mig4') and Group.getByName('Mig4'):getSize() < 1) or not Group.getByName('Mig1') then trigger.action.outText("Way to go! ".. _uName, 2, false) else (Group.getByName('Mig5') and Group.getByName('Mig5'):getSize() < 1) or not Group.getByName('Mig1') then trigger.action.outText("Evolution Completed! ".. _uName, 2, false) end -
I had a similar problem to solve and found my solution using the "grabber.lua" from this thread. I don't think it's exactly what you need, but could get you pointed in the right direction. hope that helps.
- 1 reply
-
- 1
-
-
Text to specific players in zone
74DELTA replied to 74DELTA's topic in Scripting Tips, Tricks & Issues
To accomplish what I needed, the following snippet does work as "requested". Basically for a ring event, when a player is participating in a trigger zone that encompasses the ring event which consists of 5 waves of enemy aircraft, this script identifies the player by unit and sends only them the text message. Thanks for the help! local u = mist.getUnitsInZones(mist.makeUnitTable({'[all]'}), {'alphatriggerzone'}) for i = 1, #u do local _uName = Unit.getName(u[i]) trigger.action.outText("Good Kill ".. _uName, 2, false) end That is all. thanks! -
Text to specific players in zone
74DELTA replied to 74DELTA's topic in Scripting Tips, Tricks & Issues
missed that, thanks will give it a go and update thread. -
Hey Guys, I am trying to display text to a player, or group of players that are within a trigger zone while not displaying the text to players who are not in the specified trigger zone. The script works to display the text as requested but it goes out to all players on the server instead of just the folks in the trigger zone. trying to fix that. As a bonus I cant get the script to play a sound using , ""trigger.action.outSound( file.ogg )"" but that's more of a wish list thing if anyone wants to help. Just found maybe I need to add path to the sound file? "add 'l10n/DEFAULT/'" ? function unitsInZone() local allBlueAircraft = coalition.getGroups(2, 0) -- (1=RED 2=BLUE, 0==AIRCRAFT) local zone = trigger.misc.getZone("CharlieNotice1") for i, group in pairs(allBlueAircraft) do if group ~= nil and group:isExist() == true then local units = group:getUnits() for _i, unit in pairs(units) do local uPos = unit:getPoint() if (((uPos.x - zone.point.x)^2 + (uPos.z - zone.point.z)^2)^0.5 <= zone.radius) then local unitName = unit:getName() trigger.action.outText("Nice flying!: "..unitName, 15) trigger.action.outSound( unitName , Alpha1.ogg ) --other functions can be run here too. end end end end --timer.scheduleFunction(unitsInZone, nil, timer.getTime() + 3) --will run the function every three seconds for the entirety of the mission end unitsInZone() --initiates the function Thanks for any and all assistance.
-
Looking for assistance; since the update yesterday 22 FEB 2024 my open beta dedicated server is not seen on the multiplayer server list, users cannot connect to IP direct either. I updated the local open beta DCS client to current. (2.9.3.51704) Executed some number or restarts/reboots of the software and hardware EDs link to the "modular" dedicated server install is no longer available so no update for server code to rev. 2.9.3.51704 but of course can see other multiplayer servers in the list so what am i missing please? TIA.
-
You sir, are brilliant! I am a scripting newb and have been working with MOOSE and MIST for days to get my idea to work, looks like you did that over a lunch break. Many Thanks!