-
Posts
491 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by ajax
-
Synchronise Joining In Progress MP client with an eventHandler?
ajax replied to piXel496's topic in Mission Editor
I use S_EVENT_BIRTH to track when a client enters an aircraft. Works fine in multiplayer. -
No, not at all. I am talking about the Simulation Scripting Engine built into DCS -- the one that all other mission scripts (including Mist) rely on to behave as documented.
-
Yep, I guess so... in a roundabout way.
-
Exactly! Take my recent scripting-engine bug report for example: I made several pleas to at least acknowledge the bug. Several others chimed in, too. (Thanks, guys!) But nothing from ED to date....
-
I asked that same question just a day ago. (And haven't gotten an answer.)
-
Does anything show up in the error log when that happens? Edit: FubarBundy, check your PMs.
-
It could be he (as am I) waiting on ED to fix the scripting engine?
-
See this thread for a fix. http://forums.eagle.ru/showthread.php?t=123987
-
Can't you manually create that folder and put your missions there?
-
Detecting Helicopters Landing in a Zone and disembarking troops
ajax replied to nebuluski's topic in Mission Editor
I just now happened to see this post while searching for something else. Here is a lua predicate I came up with to do most of what you want to do. (It doesn't check for disembarked troops.) It will only return true if any of the specified units 1) lands in the zone safely and 2) comes to a stop. Obviously, you will have to change the unit names to the ones you use in your mission. local function anyUnitLandedInZone(units, zone, checkLanded, checkStopped) local stopSpeed = 1.0 -- m/s local landed = false local inZone = false local alive = false local stopped = false local i for i=1,#units do local group = Group.getByName(units[i]) if group then local unit = group:getUnit(1) if unit and unit:isActive() then -- is unit in zone? local unitPos = unit:getPoint() local z = trigger.misc.getZone(zone) if z then local dx = unitPos.x - z.point.x local dy = unitPos.z - z.point.z local d = math.sqrt(dx*dx + dy*dy) if d < z.radius then inZone = true end end -- has unit landed? if checkLanded then local inAir = unit:inAir() if not inAir then landed = true end else landed = true end -- is unit still alive? local life = unit:getLife() if life > 1 then alive = true end -- has unit stopped? if checkStopped then local v = unit:getVelocity() local s = math.sqrt(v.x*v.x + v.y*v.y + v.z*v.z) if s < stopSpeed then stopped = true end else stopped = true end --return true if conditions met if landed and inZone and alive and stopped then return true end end end end return false end return anyUnitLandedInZone( { 'Cicada-1-Lead' , 'Cicada-2' , 'Cicada-3' , 'Cicada-4' , 'Vespa-1-Lead' , 'Vespa-2' , 'Vespa-3' , 'Vespa-4' , 'Vulture-1-Lead' , 'Vulture-2' , 'Vulture-3' , 'Vulture-4' , } , 'FarpLandingZone', false, false ) -
Here you go. (see attached) ME_Units.txt
-
There are actually two scripts to consider. The CTTS script is working now with the changes. However, there are a number of problems that seem to be cropping up with Mist. I was able to get Eno's mission to run without errors by modifying Mist (3.3) as follows: [font=Courier New]--change line 4251 --from groupsToAdd[#groupsToAdd + 1] = [color=Red]Unit.getByName(eventData)[/color]:getGroup():getName() --to groupsToAdd[#groupsToAdd + 1] = [color=Red]eventData[/color]:getGroup():getName() --change line 4254 --from [/font][font=Courier New][font=Courier New] groupsToAdd[#groupsToAdd + 1] = [color=Red]Unit.getByName(eventData)[/color]:getGroup():getName() --to groupsToAdd[#groupsToAdd + 1] = [color=Red]eventData[/color]:getGroup():getName() [/font] --add to the section of code starting at line 4472 --old if string.upper(newTable['category']) == 'GROUND_UNIT' then mistCategory = 'vehicle' newTable['category'] = mistCategory elseif string.upper(newTable['category']) == 'AIRPLANE' then mistCategory = 'plane' newTable['category'] = mistCategory end --new if string.upper(newTable['category']) == 'GROUND_UNIT' then mistCategory = 'vehicle' newTable['category'] = mistCategory elseif string.upper(newTable['category']) == 'AIRPLANE' then mistCategory = 'plane' newTable['category'] = mistCategory [color=Red] elseif string.upper(newTable['category']) == 'HELICOPTER' then mistCategory = 'helicopter' newTable['category'] = mistCategory elseif string.upper(newTable['category']) == 'SHIP' then mistCategory = 'ship' newTable['category'] = mistCategory [/color] end [/font]
-
Override camera controls in a multiplayer track playback
ajax replied to btsraziel's topic in DCS World 1.x (read only)
Open the track in the Mission Editor. Change the mission's view option and save.-
- 1
-
-
I thought I read in the manual that INU heat is not modeled in the sim.
-
You can use the Mission Editor triggers to activate one of several manpad groups in the zone. First create multiple manpad groups and place them at random locations in the zone. Second set them all to 'late-activated'. Then create a trigger to randomly select one of these groups and activate it. (I'm going from memory so I don't have all the details handy. There should be multiple threads in this forum for doing this. Try doing a search.)
-
Yes, that should fix the CTTS error. (Switch red and blue -- I was right the first time: red = 1 and blue = 2. Sorry about that.) Also, it should be Groups.Category.GROUND not Groups.categories.GROUND.
-
Just a note to script-writers to warn you of some scripting-engine bugs introduced in 1.2.8. If you use any of the following functions in your scripts, you will have problems unless special care is taken*: coalition.getGroups( any_side, Groups.Category.AIRPLANE ) coalition.getGroups( any_side, Groups.Category.HELICOPTER ) coalition.getGroups( any_side, nil ) and retval = coalition.addGroup( any_country_ID, Group.Category.AIRPLANE, any_group_data ) retval = coalition.addGroup( any_country_ID, Group.Category.HELICOPTER, any_group_data ) if you use retval for anything. * By 'special care', I mean doing things like: - using pcall() first and check for success. - find an alternate method for getting groups, such as using the env.mission table. (This works for static groups created in the Mission Editor but not for dynamically spawned groups.) - keep track of dynamically spawned groups yourself. Note: There may be other bugs, as well. These are ones that I have discovered so far.
-
I have seen this, as well. It makes absolutely no sense. It almost seems as if the very first time a coalition.getGroups() function is called it works and thereafter it doesn't. Hmmm.
-
That may be your intent, but the FindNearestEnemy function as written will return all group types including non-valid entries for helicopters and airplanes. As subsequent code iterates through the table, for example doing other functions such as group:getUnits(), it will eventually run across one of the non-valid groups and cause an error. If infantry only is desired you can change the functions to local RedList = coalition.getGroups(1, Group.Category.GROUND) and local BlueList = coalition.getGroups(2, Group.Category.GROUND) which should fix the CTTS script. I suspect the mist errors are due to its functions being passed invalid groups. The mist error message, "unit name string missed", could have been caused by something like units = group:getUnits() followed by units[1].getName() function. Without looking at mist more closely, I can't be sure. But these errors are conceivably all related.
-
Your manpad DoScript seems okay. It appears there is an error inside of mist, which I suspect is related to the scripting-engine bugs. I don't see that there is much more you can do until it gets fixed.
-
Okay, I don't see anything wrong with the manpad trigger. Depending on the severity of the error, scripts will simply stop working when one is encountered. The first error occurred in mist. Perhaps mist stopped working, and then your later manpad script couldn't execute. Try it again after fixing the zone name.
-
No, the error messages are there. I downloaded your mission and tried it. Here is your problem (at least initially, there may be more once you get past this step): Your DoScript trigger references 'RZone1', 'RZone2', and 'Rzone3'. However, 'Rzone2' is the zone's actual name. (Note the capitalization -- Lua is case-sensitive.)
-
Users\{user name}\saved games\dcs\logs\dcs.log