-
Posts
12 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Xillinx
-
Raf, Awsome job ! I do have a quick question. Does the __RESPAWN__ work with AI helicopters? I tried putting one in with a __RESPAWN__ trigger zone with the same name as the group, but he doesn't respawn when I kill him. By kill him, I set him up with no fuel and let him fall and hit some powerlines. The goal is to create a dynamic medevac mission that randomly respawns within a trigger zone so that our medevac units have something to do while the others blow stuff up. v/r (A/229) del Taco
-
Any help??
-
Fellow Lua Gods, Respectfully request some assistance or help with a script I would like to use in my mission. This script would check a table of trigger zones that enemy targets exist and report to the member whether or not the area is Clear or if enemy's still exist. Im not looking for a number, just a "Area Clear" or "Area Unsecured". I cannot use the Transport scipt (CTTS.lua) for the countextracted() function because I am already using a different transport script. I am trying to get something similar to the HueyDrop Mission Status Report. Ive tried picking different functions from that mission and Im getting no where with it. Here is they script I am sampling from but all I get from all the zones that the area is clear. Any help would be greatly appreciated. DropoffZones = { [1] = { Name = "Krasnodar-Center Airfield", ZoneName = "Airfield", }, [2] = { Name = "City Headquarters", ZoneName = "City headquarters", }, [3] = { Name = "Barracks", ZoneName = "Barracks", }, [4] = { Name = "West Bridge", ZoneName = "Bridge 1", }, [5] = { Name = "South Bridge", ZoneName = "Bridge 2", }, [6] = { Name = "East Bridge", ZoneName = "Bridge 3", }, } function FindNearestDropoffZone(unit, maxDistance) local minDist = maxDistance local minZone = nil local unitpos = unit:getPoint() for i=1,#DropoffZones do local zone = DropoffZones[i] local triggerZone = trigger.misc.getZone(zone.ZoneName) local dist = GetDistance(unitpos.x, unitpos.z, triggerZone.point.x, triggerZone.point.z) if dist < minDist then minDist = dist minZone = zone end end return minZone end function StatusReport(arg, time) -- array of Group function coalition.getGroups(enum coalition.side coalition, enum Group.Category groupCategory or nil) -- array of Unit function Group.getUnits(Group self) -- enum country.id CoalitionObject.getCountry(CoalitionObject self) local zoneTable = {} local zoneFriendly = {} for i=1,#DropoffZones do zoneTable[DropoffZones[i].Name] = 0 zoneFriendly[DropoffZones[i].Name] = 0 end local groups = coalition.getGroups(coalition.side.RED, Group.Category.GROUND) for i=1,#groups do local group = groups[i] if group ~= nil then local units = group:getUnits() for j=1,#units do local unit = units[j] if unit ~= nil then local country = unit:getCountry() if country == 0 then -- if RUSSIAN local zone = FindNearestDropoffZone(unit, 5000) if zone ~= nil then zoneTable[zone.Name] = zoneTable[zone.Name] + 1 end end end end end end local groups = coalition.getGroups(coalition.side.BLUE, Group.Category.GROUND) for i=1,#groups do local group = groups[i] if group ~= nil then local units = group:getUnits() for j=1,#units do local unit = units[j] if unit ~= nil then local country = unit:getCountry() if zone == 2 then --USA local zone = FindNearestDropoffZone(unit, 5000) if zone ~= nil then zoneFriendly[zone.Name] = zoneFriendly[zone.Name] + 1 end end end end end end local text = "MISSION STATUS - See mission briefing for details\n\n" for k,v in pairs(zoneTable) do if v > 0 then text = text .. tostring(k) .. ": " .. tostring(v) .. " Area unsecured.\n" else if zoneFriendly[k] > 0 then text = text .. tostring(k) .. ": Area cleared!\n" end end end trigger.action.outText(text, 20) return time + 45 end do timer.scheduleFunction(StatusReport, nil, timer.getTime() + 45) end function UnitInZone(unit, zone) if unit:inAir() then return false end local triggerZone = trigger.misc.getZone(zone.ZoneName) local group = unit:getGroup() local groupid = group:getID() local unitpos = unit:getPoint() local xDiff = unitpos.x - triggerZone.point.x local yDiff = unitpos.z - triggerZone.point.z local dist = math.sqrt(xDiff * xDiff + yDiff * yDiff) if dist > triggerZone.radius then return false end return true end -Xillinx
-
RagnarDa, Awesome job with this script. Our group uses it on all our missions. I do have a request to add to the script. Is there any way to have the survior deploy their smoke more then once. Some medevacs have BAD days and when shooting the approach, they fall out of the sky and die. So when the medevac goes back into action to recover the survivor again, the soldier does not deploy another smoke. v/r Xillinx
-
All, I am looking for some guidance to solve this issue in my mission. What does this error ( "Error in error handling" ) actually mean, and if possible, can someone dumb it down. I do not know LUA and trying my best to learn. Sorry. I failed to mention that I am using Slmod and Mist
-
As ENO mention, I would like to see the script modified to include a different passenger load out for the Mi-8. Example - Huey can pickup 10 troops and the Mi-8 can pickup 18 troops.
-
Gimes, Ive check the logs but got nothing out of it. Thanks for the info. Is there a possibility that the mission editor itself can get corrupt?
-
Editors, Can someone please help me. I am about to pull my hair out. I keep getting a Mission script error - [string "C:\User\MyName\AppData\Local\Temp\DCSV~mis000******"]:1 unexpected symbol near 'i' So just to give a quick example of what I did. This is a very simple example and wanted to break it down just for show. I used the CTTS script for transport. I changed the pickzone1 color to blue and made 2 dropzones (dropzone1 and dropzone2). Making dropzone1 red and dropzone2 none. Added the script in Triggers - Initialization Script. Created a huey client with pilot name helicargo1. Here is the mission and the CTTS file I edited CTTS.lua My error.miz
-
Hello All, Has anyone published or know where I can get the cockpit triggers for the UH-1H? I know that Olgerd posted one for the A10 and wanted to know if there're the same for the Huey. v/r Fernando
-
ED SIMS SCREENSHOT AND VIDEO THREAD!!!! (NO USER MODS OR COMMENT)
Xillinx replied to rekoal's topic in Screenshots and Videos
Here is a quick snapshot I took after completing our mission. - 159th SOS - " del Taco " -
Hello All, First time post! So I have already spoke with Speed about the add_task function but wanted to share with everyone else the "bug" that was found. I wanted to use the add_task function to show that there were "X" amount of tanks in an area and when the user destroyed a tank, I wanted the current task to update the remaining tanks. What we figured out is with a trigger set to refresh the task, the task number would continue to increase. Now the mission is more complex that I'm building but tried given Speed a general idea of what I wanted to do. Many thanks to Speed for taking the time to help me out with the scripts :) v/r Fernando