Jump to content

Death Merchant

Members
  • Posts

    65
  • Joined

  • Last visited

Everything posted by Death Merchant

  1. The MOOSE SPAWN:ParkAtAirbase() will take a table called Parkingdata. Here is the description: (optional) Table holding the coordinates and terminal ids for all units of the group. Spawning will be forced to happen at exactily these spots! I'm not sure how to format the table. Can someone post an example? If it matters, I'll be spawning the aircraft at Krasnodar-Center. Thanks, DM
  2. Thanks for the help on this. Your script is awesome. I've been scripting for a while with both MIST and MOOSE, but there is a bit of a learning curve. Looking at scripts like yours is very helpful. I've learned a lot from it. DM
  3. I'm looking for answers as well. As of right now I have to have Adrenalin open on my second monitor and use the button to start and stop recordings.
  4. Thanks for the input. That's what we are doing now. It seems I may just have to create a large number of convoys to keep it interesting. I was hoping that there was an easy way to create a random convoy by choosing units from a list, but there doesn't seem to be. I know I could create a random group using the Mission Scripting Environment, but it would take a lot of coding. Now I'm thinking I may just spawn Units and use something like a Follow command or Escort to form a quasi-convoy. I think I'm going to look into that.
  5. Hey guys, I need a bit of help. I'm trying to create a convoy of random units. It's getting old killing the same convoys over and over. I'm using MOOSE and MIST as well as some DCS functions to randomize start locations and destinations, but the only way I know how to create a convoy is to build it in the ME and set it to late activation. After a few missions we start to recognize the convoys and know exactly where any AA is. Is there a way to build a convoy of random units? Thanks, DM
  6. I don't think there is a way to do this with MOOSE or scripting only. I use the ME editor to load a mission via a Flag is True condition, then in my scripting I use trigger.action.setUserFlag(####, true) to trigger the actionl.
  7. How is "initUnit" being created? Is "initUnit" the Unit Name or Group name in the Mission Editor?
  8. I've taken a completely different approach to this problem. I combine my scripting with ME triggers. In the mission editor I set a TRIGGERS ONCE with CONDITIONS FLAG IS TRUE(####) and ACTIONS LOAD MISSION(Mission Name.miz) Then, in my scripting I simple use a function to: trigger.action.setUserFlag(####, true)
  9. I keep going to that site, but the download link seems to be broken. I've also tried downloading it via Eclipse, but can't get it to work. Do you have a direct link?
  10. Dude, you're awesome. I was hung up on finding 'escort', I never even knew there was a 'follow' command.
  11. I can't seem to find a download source for the Lua Development tools. The link on the website is broken. Does anyone have a good link? Thanks, DM
  12. Here is how I have been handling this issue so far, without scripting. It seems to work ok. Plus, I like to see the SAR bird take-off from the carrier. It's cool for videos and just general effect. For this example I am using the Forrestal as the carrier and a Huey as the SAR bird. This is something I'm doing in an early war mission. To keep the example simple, I am just placing 1 waypoint at the final destination of the carrier. In this example, it is simply cruising along the coast at 11 kts. 1. Place carrier in ME. 2. Set destination waypoint, speed 11kts. GS checked. Note the time of arrival. 3. Place helo in ME. Air start or take-off, your choice. I use "Take off from parking hot". 4.Set the destination waypoint next to the destination waypoint of the carrier. Check 'Fix Time', enter the time of the carriers arrival at it's final destination. - Now the carrier and the helo will arrive at the end of the route at the same time. - You will see that the ME has adjusted the entry in the speed box. Now we are going to synchronize their paths. 5. Select the carrier in the ME. 6. Add a waypoint slightly in front of the carriers initial position so that the time of arrival is about 3 minutes after the initial spawn point. Note the time of arrival. - If the carriers first waypoint is at 14:00:00, you want the second waypoint at about 14:03:00. - It doesn't have to be to-the-second but we need enough time for the helo to take off and fly it's departure pattern. 7. Set the speed of the carrier at the second waypoint to the speed at the last waypoint, in my example, 11 kts. - Now the carrier is going to spawn, adjust it's speed and arrive at the first waypoint doing 11 kts. -It's going to continue on it's course doing 11 knots and arrive at the destination at a certain time. - The time of the waypoint arrival may change when you change the speed, if so, adjust the waypoint's location for an arrival time of about 3 minutes after spawn. 8. Select the helo and set a waypoint right next to the 3-minute waypoint of the carrier. 9. Set the arrival time of the helo at the waypoint to coincide with the carriers arrival at it's waypoint, and check 'Fix Time'. Basically we are telling the carrier to move to waypoint 1 and then 2 at a particular speed. We are then telling the help to move to waypoint 1 and then 2 to arrive at a particular time, that matches the carriers time of arrival. I hope this helps.
  13. Guys, I'm working on a script for a spotter that finds and smokes targets. I'm using spawn and PushRoute to get him to follow a table of waypoints. When he finds a target I am using TaskOrbit to have him loiter. I'm having trouble getting him to resume the route once he is finished. Is there a way to track waypoints as they're passed, or can I return the number of the active waypoint in some manner? Thanks, DM
  14. This can be done with some scripting. How are your scripting skills?
  15. Unfortunately the way the script is used that method causes some to respawn repeatedly before they have a chance to take off because they are on the ground before they take off. I think the inactivity script is the way to go, but thanks a lot for your help.
  16. Thanks Wizxrd, I'll take a look. DM Oh, is there anyway to shorten that time? DM
  17. Hey Guys, We have a mission script that allows us to call up AI Cap. It works well, but after the Cap RTBs on Out of Ammo, it doesn't despawn, it just sits on the ramp. We would like it to despawn so that we can call it up again. Here is how it is setup in the ME. Is there a setting that will cause it to despawn? Thanks, DM
  18. Thanks for the input guys. I've been having a problem with the SPAWN:New(Template) not incrementing the serial number while spawning, so sometimes it replaces the previous spawn. I have found a workaround, but it's a bit time consuming to script. Thanks, DM
  19. Thanks Wizxrd, I'm familiar with the NewWithAlias, but it doesn't do quite what I would like. Is there no way to change a Unit name after it's spawned? DM
  20. Guys, Can I change the name of an existing group after it has been spawned? For instance if I'm using the SPAWN:New(Template), and the group spawns with the group name Ground#001, is there a command to change the name? I'm using MOOSE. Thanks, DM
  21. It's invoked by the event handler. That's the problem. In fact I've found some other threads talking about how the event handler does not work properly for all events in MP, specifically the PlayerEnterUnit. So it seems to be a MP issue. I'm going to experiment with onBirth and see if that will work the way I want. DM Nope, that didn't work. Anyone have any other ideas?
  22. The code works perfectly in SP, but fails at the: function TigrUnit:OnEventPlayerEnterUnit(EventData) on the MP server. Here is the code for the event handler function. You can see the first message in the screenshot, but not the next. I can enter and take control of the Tigr, but the event does not seem to trigger the event handler. In SP I get the second message and the menu. --// Subscribe to Event //-- if Cargo_Type_name == "Tigr_233036" then trigger.action.outText("Unit Detected Hercules Cargo", 300) U = 1 TigrUnitName = Herc_Cargo_Spawn.units[U].name TigrUnit = UNIT:FindByName(TigrUnitName) TigrUnit:HandleEvent(EVENTS.PlayerEnterUnit) function TigrUnit:OnEventPlayerEnterUnit(EventData) trigger.action.outText("Event Detected", 30) EventGroup = EventData.IniGroup EventGroupID = EventGroup:GetID() SetupConstructionMenu(EventGroupID, EventGroup) trigger.action.outText("Menu Setup Function Run", 30) end end
  23. cfrag, If you look at the upper right hand corner of the images, you'll see a message 'Menu Functions....'. that's the output I used as a trace to verify it got to the menu set up portion of the code. I'm hosting on a stand-alone server. I'm going to add some more messages for trace. DM
  24. cfrag, I'll explain the best that I can. I'm new to all of this. I am working on adding some functionality to a mission. The following works fine when I run the mission on my local machine in SP mode. We are using the Hercules mod to spawn units via coalition.addGroup. When it spawns a Tigr, it uses the code from the above message to add menu items to the F10 menu. The purpose is to be able to unload or drop crates/units from the Herc. When you have 1-Tigr and 4-Hummers in a 300 meter radius, you enter the Tigr via CA/ralt-J. From the F10 menu you choose 'Constuct Nasam Site' and the 4 Hummers are destroyed and a Nasam Site is spawned. The Herc units and Nasam Sites are persistent from mission to mission. I'm adding this functionality to the Snowfox Escalation Mission. Everything works great in SP on my local machine. I am hosting a dedicated server on a second machine here in my home. The mission has been running great for weeks. The mission is persistent, the Herc spawned units are persistent, etc. The only problem is that when I run the script to construct the new units on the MP server, the Event Handler does not seem to be detecting the event. The menu items do not appear. DM You can see my debug message in the upper right indicating the event handler ran the menu function. DM
  25. To be honest, I'm not sure how to do that in this instance. These units have been spawned via coalition.addGroup while the mission is running. I read that some of the event triggers do not work properly in MP, so I took the time to modify the script and use the MOOSE event handlers. Now it subscribes to the event for a particular type of unit, at the unit level. It works fine in SP, but doesn't work in MP. I know the code is good because it works fine in SP. coalition.addGroup(Cargo_Country, Group.Category.GROUND, Herc_Cargo_Spawn) --// Subscribe to Event //-- if Cargo_Type_name == "Tigr_233036" then U = 1 TigrUnitName = Herc_Cargo_Spawn.units[U].name TigrUnit = UNIT:FindByName(TigrUnitName) TigrUnit:HandleEvent(EVENTS.PlayerEnterUnit) function TigrUnit:OnEventPlayerEnterUnit(EventData) EventGroup = EventData.IniGroup EventGroupID = EventGroup:GetID() SetupConstructionMenu(EventGroupID, EventGroup) end end Thanks for you help. DM
×
×
  • Create New...