Jump to content

Riscorider

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by Riscorider

  1. Aircraft kills are now being counted twice. AI to AI, player to AI, AI to player doesn't seem to matter. Haven't tried player to player or as client. S_EVENT_Kill event handler is activated twice for each kill. In the attached screen shot you can see the DCS score shows each aircraft kill twice and the text messages, activated by a scripted kill event handler, show 6 aircraft kills despite only 3 actually being killed. Ground and sea units are not affected and are only counted once.
  2. Confirmed. An update to the map changed the object Ids for the scenery buildings. Updated script and problem solved
  3. I think I may have figured out what has happened. Looks like the object ID previously assigned to these particular buildings has changed during this update. Must be a map update I'm guessing. Gonna test it and update if that is, in fact, the cause.
  4. Today's change (DCS 2.9.7.58923) somehow affected the Dead Event Handler. Map buildings assigned as zones using the "assign as" feature are no longer being detected when dead/destroyed. The script shown below still works fine for everything except the two munitions buildings. Any ideas @BIGNEWY? Log Error: 2024-08-10 15:26:47.848 ERROR SCRIPTING (Main): Mission script error: [string "C:\Users\chiph\AppData\Local\Temp\DCS.openbeta\/~mis000044A6.lua"]:805: attempt to call method 'getName' (a nil value) stack traceback: [C]: in function 'getName' [string "C:\Users\chiph\AppData\Local\Temp\DCS.openbeta\/~mis000044A6.lua"]:805: in function 'onEvent' [string "Scripts/World/EventHandlers.lua"]:13: in function <[string "Scripts/World/EventHandlers.lua"]:11> Script: DeadUnitHandler = {} function DeadUnitHandler:onEvent(Event) if Event.id == world.event.S_EVENT_DEAD then if Event.initiator then local DeadUnitName = Event.initiator:getName() -- this is line 805 in the mission script if ( string.find(DeadUnitName, "Bandar Abbas SA6 Launcher 1") or string.find(DeadUnitName, "Bandar Abbas SA6 Launcher 2") or string.find(DeadUnitName, "Bandar Abbas SA6 Launcher 3") or string.find(DeadUnitName, "Bandar Abbas SA6 Launcher 4") ) then DeadLauncherCount = DeadLauncherCount + 1 if ( DeadLauncherCount == 4 and SA6Dead == 0 ) then CPH_SA6Dead() else end elseif (string.find(DeadUnitName, "Bandar Abbas SA6 Radar") and SA6Dead == 0 ) then CPH_SA6Dead() elseif (string.find(DeadUnitName, "MV Baltic Cove") ) then GROUP:FindByName("Iran Attack Group 1"):OptionAllowJettisonWeaponsOnThreat() GROUP:FindByName("Iran Attack Group 2"):OptionAllowJettisonWeaponsOnThreat() GROUP:FindByName("Iran Fighter Escort"):OptionAllowJettisonWeaponsOnThreat() GROUP:FindByName("Iran Attack Boats"):CommandSwitchWayPoint( 1, 4 ) trigger.action.outText("MV Baltic Cove has been sunk!", 30) elseif (DeadUnitName == 163155054 ) then -- Munitions 1 Target AmmoDump1Hit = 1 AmmoDumpsDestroyed = AmmoDumpsDestroyed +1 trigger.action.setUserFlag('AmmoDump', AmmoDumpsDestroyed ) timer.scheduleFunction(CPH_Ammo_Dump_Secondary, nil, timer.getTime() + 20) elseif (DeadUnitName == 163154967 ) then -- Munitions 2 Target AmmoDump2Hit = 1 AmmoDumpsDestroyed = AmmoDumpsDestroyed +1 trigger.action.setUserFlag('AmmoDump', AmmoDumpsDestroyed ) timer.scheduleFunction(CPH_Ammo_Dump_Secondary, nil, timer.getTime() + 20) elseif (DeadUnitName == "Bandar Abbas Intl" ) then -- Detect Runway Destroyed RunwayDestroyed = 1 trigger.action.setUserFlag('RunwayDestroyed', 1 ) trigger.action.outTextForCoalition(2, "Bandar Abbas Runway Destroyed!!!", 30, true) CPH_Runway_Smoke() else end end end end world.addEventHandler(DeadUnitHandler)
  5. It hasn't been working with other event handlers either. The event handlers are working because I can use them to send messages and/or sound to coalition or to all but have been unsuccessful in sending sound or messages to a group or an individual unit other that the server host when in a multiplayer environment. Researching the DCS forum and Moose Discord seems to indicate its possible but I just haven't discovered what I'm doing wrong.
  6. I'm trying to have sounds play to an individual unit or group when certain events occur during a mission running on a multiplayer server. So far the sounds play for me in any unit I occupy when I am testing (When joining a unit on the server I am hosting) but when another player/client occupies a unit the targeted sound and text does not play to that individual. I've tried using the DCS Simulator Scripting Engine and Moose. Example script shown below: CPH_PLAYERENTERUNITHANDLER = {} function CPH_PLAYERENTERUNITHANDLER:onEvent(Event) if Event.id == world.event.S_EVENT_PLAYER_ENTER_UNIT then local PlayerUnit = Event.initiator local PlayerGroup = Event.initiator:getGroup() local PlayerGroupName = PlayerGroup:getName() local PlayerGroupID = Group.getByName(PlayerGroupName):getID() -- for SSE Sound to Group function local PlayerName = Event.initiator:getPlayerName() local PlayerUnitName = Event.initiator:getName() local PlayerUnitID = Event.initiator:getID() -- For SSE Sound to Unit Trigger function local StartupGroupName = GROUP:FindByName(PlayerGroupName) -- for Moose Sound function local StartupSound1 = USERSOUND:New("Start Me Up Edit.ogg") -- Moose --trigger.action.outText(PlayerName.." is the Player Name", 25) -- Used during debugging --trigger.action.outText(PlayerUnitName.." is the Player Unit Name", 25) -- Used during debugging --trigger.action.outText(PlayerUnitID.." is the Player Unit ID", 25) -- Used during debugging --trigger.action.outText(PlayerGroupName.." is the Player Group Name", 25) -- Used during debugging --trigger.action.outText(PlayerGroupID.." is the Player Group ID", 25) -- Used during debugging trigger.action.outSoundForGroup(PlayerGroupID, "Start Me Up Edit.ogg" ) -- DCS SSE command for sound to group (similar for unit) -- StartupSound1:ToGroup( StartupGroupName, 3 ) -- Moose command for sound to group (similar for unit) else end end world.addEventHandler(CPH_PLAYERENTERUNITHANDLER) Some lines currently shown as commented out as I've tried various combinations to get the sound file to play to an individual unit, or an individual group (only one unit in a group) and client. So far no joy using scripting. Even tried the mission editor (Unit Alive) but it didn't work in multiplayer either. I can use the event script shown above to send sound and/or text to a Coalition, or All successfully so I know the event handler works, just can't get the commands for an individual unit or group to work in multiplayer environment (except for the server host). Am I doing something wrong or is it just not possible to use the sound to unit or sound to group capability in multiplayer servers? Any help appreciated!
  7. Tomahawk cruise missiles frequently proceed partway to designated target then orbit until fuel exhausted. This behavior occurs when using scripting or the mission editor in both 'Fire at Point' or when assigned a specific group or unit as a target. Occasionally, one will perform as expected and hit the target but this has become the exception. Please fix!
  8. For Air to Air Refueling: 1. Add ability to specify amount to be taken on to complete refueling when not filling tanks until full. 2. Prevent AI aircraft from colliding with player aircraft during refueling evolution. AI aircraft have collided with me while I was refueling an at least 3 occasions.
  9. You sir, are a genius! That worked like a charm. Thank you so much!! Riscorider
  10. Recently when adding a "Sound to Group" action to a trigger a problem became apparent. No longer does a pop up window appear to let you select the sound file to play. I am using the latest DCS open beta. Other action commands which use pop up windows (Load Mission for instance) are working properly. Not sure if I did anything to cause this but have tried uninstalling then reinstalling DCS open beta with no change in the symptom. Any ideas on what is causing this or how I might correct it? Thanks!
  11. I suspected I was doing something wrong but I just couldn't figure it out! Thanks for the assist. I heard the WP6 reference but didn't pay too much attention since I had found two tanks seemingly as described by Arrow 3. Heading back to the cockpit!
  12. Checked the debriefing status: Not sure which tank is which but the debriefing shows: 1st - Alpha Tank 1-1 hit by Aerial 1-3, then hit and killed by Steep (Player), 2nd - Alpha Tank 2-1 hit and killed by Aerial 1-2. 3rd - Alpha Tank hit and killed by Aerial 1-2. Not sure if that helps but maybe the sequence and events might have a clue.
  13. Ok. Just tried it again. This time both tanks were killed by the approaching friendly forces during my attack approach. When checking the status tab only one tank showed as killed but both their 'red dots' were gone. I made a couple extra passes just to be sure but no change in status. Any suggestions?
  14. Not running any mods besides those I've purchased through ED. Will keep trying. V2.7 has certainly seen its share of issues and crashes. Thanks for checking for me! I appreciate your effort!
  15. The F10 radio option is not appearing after the tanks have been killed so they must not be recognized as destroyed. All events listed through 4 above occur as expected. Not sure what I can do except keep trying.
  16. No, total silence.
  17. There are actually three tanks in the vicinity. The two that are the ones Arrow 3 is apparently referring to, and another one on a different road nearby. Sometimes one or more are killed by friendlies but even with all 3 dead, the four friendly tanks just stop on the road where the third one was and don't go any further. Thanks for checking for me. I look forward to the solution!
  18. I am having trouble with Mission 9. After killing the tanks as requested by Arrow 3 nothing happens. No F10 menu items are available, no prompts appear to contact anyone, and no one contacts me. I can circle around and around, even return to bandar abbas but nothing happens. What am I doing wrong?
×
×
  • Create New...