Jump to content

Grimes

ED Beta Testers
  • Posts

    9637
  • Joined

  • Last visited

  • Days Won

    11

About Grimes

  • Birthday 09/08/1985

Personal Information

  • Location
    Black Mesa

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. It is currently only functional on FARPs. Its a little weird in terms of how the game treats the objects IIRC.
  2. Setting a flag of the group name is the same thing as what that was doing. It was a value, that when it exists means that the group was going to respawn and acted as a lock of sorts to prevent the multiple messages or multiple respawns. Literally just a different way to do the same thing. And yes, the number value in outText is the display time. https://wiki.hoggitworld.com/view/DCS_func_outText With the 3rd value set to true it will display the message in a different format and will overwrite any existing message being displayed.
  3. getPoint might be more directly useful as it only returns the coordinates. However getPosition().p is functionally the same thing. The rest of the values returned with position are used only with the orientation of the object. For example: local heading = math.atan2(unitpos.x.z, unitpos.x.x) Worth noting that the coordinates used in tasks is typically a "vec2" and not "vec3". Which basically means that the vec3.z value needs to be the vec2.y value. So... local point = Unit.getByName("target"):getPoint() local task = {} task.x = point.x task.y = point.z https://wiki.hoggitworld.com/view/DCS_task_mission
  4. I think it is AI path calculation more than anything mist is doing. Most of what that mist function does is it generates the points given to the route table and assigns the task to the AI. Try it without the disableRoads being defined, meaning mist will find the closest road from the start and destination points.
  5. Using a number for the 2nd parameter in mist.respawnGroup isn't a delay in respawning the group. It is a delay for when the group task gets assigned. At first glance you could schedule mist.respawnGroup to occur at a later point in time, however I assume you are constantly checking if not Group.getByName, as a result it'd just schedule mist.respawnGroup however many times between when its dead and when the group actually respawns. One way would be to add extra conditions. if not Group.getByName('RUS-T72B-6') then if not rusB6Respawn then --- checks if a time was saved when the group was killed rusB6Respawn = timer.getTime() --- creates a global variable for that group elseif rusB6Respawn + 120 < timer.getTime() -- checks if the time the group died + 120 seconds is less than the current time mist.respawnGroup('RUS-T72B-6', true) -- respawn rusB6Respawn = nil -- delete value so it can be created again with the initial check end end At that point it might be easier to just create a function that checks and manages the groups you want to check. Maybe it has a table of the group group names and each time they died at, which iterates the table to respawn them as needed. Basically the above lua example is fine for a few groups, but gets annoying fast because you need a unique global variable for when each respawns.
  6. I've only ever done it outside of DCS with python. But yeah, same concept of doing it with something like luazip externally from DCS. Something like the web editor might be the easiest to use since it has a UI and you can modify time of day or weather in the miz pretty quickly.
  7. No. The env.X tables are just a copy of a few files located within the miz file. You could edit the copy by adding triggers, units, or whatever and the serialize the files and re-insert into the miz so that on the next load the changes are reflected. I've done that a few times to fix or change entries outside of the editor in bulk.
  8. I think it is the unique situation that a dead object is being spawned. It has a spawning event, but it can't get data about the object because it is dead, therefore an error. It is a little weird because the mist DB will populate the DB entries for statics set as dead in the mission file, but everything it knows about that is from the miz and not derived from other functions at runtime.
  9. I will have to check it out. That error is from the database update scripts. Simply put the mist.DBs.X won't be updated with that object. You can get me the table that you passed to coalition.addStaticObject that generated the error would be most helpful. Assuming you have lfs and io commented out in missionScripting.lua, this line will write a table to a file in your dcs/logs folder. mist.debug.writeData (mist.utils.serialize,{'static', whateverTablePassedToAddStaticObject}, 'dbUpdateERror.lua') Or if you have other means of getting a serialized version of the table passed to the function.
  10. Mist runs in the mission scripting env, not the export env. There are individual functions or functionality that you could probably cut and paste, or at least lightly modify, to work in the export env. But natively it would not run because it relies heavily upon functions from the mission env.
  11. I'd just want it so I can remove anti-ship missiles from ships because the ROE settings are inadequate and AI will waste the things.
  12. Nope. Gist of it is to use https://wiki.hoggitworld.com/view/DCS_event_shooting_start event to start calling https://wiki.hoggitworld.com/view/DCS_func_searchObjects on a point around the aircraft and every few milliseconds searching for weapons. You add any missing shells to a table. Use https://wiki.hoggitworld.com/view/DCS_event_shooting_end to stop the check for world.searchObjects. Meanwhile you have another function that runs however often you want checking, updating the position, and removing shells as they cease to exist.
  13. There are some samples on the wiki, but they are typically pretty short and limited to the specific scope of that function. Can always search this forum, there are plenty of questions that have been asked and answered here. Or make a new thread asking specifics.
  14. Scripting is the primary way of interacting with weapons. Most often via the shot event to get the weapon object, then its up to you to decide what you want to do with that object. A few training scripts check the distance of the missile to its target and then remove the missile by calling an Object.destroy on it. On the Grayflag servers I use land.getIP on information from weapons to determine where a bomb or missile precisely impacted a runway section. Unfortunately you can't create a weapon in air. The AI or a player has to launch the weapon from something. Then its up to whatever the guidance of that weapon to hit whatever it is targeting.
  15. Fixed the example page I copied that from on the wiki.
×
×
  • Create New...