Jump to content

Death Merchant

  • Posts

  • Joined

  • Last visited

Everything posted by Death Merchant

  1. 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.
  2. Thanks Wizxrd, I'll take a look. DM Oh, is there anyway to shorten that time? DM
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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?
  8. 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
  9. 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
  10. 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
  11. 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
  12. Guys, I've written a simple script to spawn new units from a group of units. It works fine in SP, but does not in MP. From what I can figure, it's a problem with the Event Handler. Does the Event Handler work differently for MP? Here is the code I am using. It uses the Player Enter Unit event. EventHandlerControlUnit = {} function EventHandlerControlUnit:onEvent(Event) if ( Event.id == world.event.S_EVENT_PLAYER_ENTER_UNIT and Event.initiator:getPlayerName() ~= nil ) then EventGroup = Event.initiator:getGroup():getName() EventGroupType = Event.initiator:getTypeName() EventGroupID = Event.initiator:getGroup():getID() EventPlayerName = Event.initiator:getPlayerName() trigger.action.outText("Control Detected "..EventGroupType.." "..EventGroup, 15) if ( EventGroupType == "Tigr_233036" ) then trigger.action.outText("Get out of my truck!", 15) end NasamSpawn(EventGroup) end end world.addEventHandler(EventHandlerControlUnit) Any ideas? Thanks, DM
  13. I've been having trouble setting up the LDT, I keep getting errors, so I've been using Notepad++ for my LUA editing. I need to get the LDT setup, I hear it's really helpful.
  14. Thanks guys, you were a big help! It took some work, but I got everything working. I've taken the SnowFox Escalation Misison, added the Hercules mod and added persistent functionality for the units dropped from the Herc. This is going to help a lot. DM
  15. Hey guys, I'm learning scripting and using MOOSE. I've been having limited success with GROUP:FindByName and UNIT:FindByName. From what I can tell the problem usually stems from not knowing the GROUP or UNITS proper and complete name. Is there a way to generate a list of all of the GROUPS and UNITS in a mission so that I can verify the I have the name correct? Thanks, DM
  16. Wizxrd, Thanks for the heads up about the log file. I didn't even know it existed. I've done some more testing and found the line in the code that was keeping the script from running. It's a Moose ZONE command, which I am just now learning about, so I'll post something in the Moose forum. DM
  17. Help!! I am working on a mission and I have a DO SCRIPT FILE trigger, but the file doesn't run. I've looked in the .miz file, and the script is present in the default folder, along with the other scripts, but this particular one won't run. How should I start troubleshooting this? I've tried erasing the trigger, and recreating it, I've also copied the trigger that runs another script and changed the file name, but no success. Any thoughts? Thanks, DM
  18. Is there a tutorial or other resources for learning how to create a persistent campaign. I'm currently learning how to create missions. I have a background in coding and I am in the process of learning LUA. I would love to be able to create persistent campaigns but have not been able to find any information on how to create them. Thanks
  19. It seems to have been SAM threats. I guess the bombers were using terrain masking or something to avoid detection. I've removed a lot of the unnecessary elements from this mission, including some SAM sites. The bombers are now behaving as expected. Thanks for the help guys.
  20. Wow, this is a great guide. I've been having trouble getting bombers to perform the way I expected, but this was a big help. Is there somewhere I can look up typical mission profiles? Alt, airspeed etc.?
  21. MSL, above sea level. No, they are actually in enemy (their own) territory, so no SAMs or other threats. In fact they are supposed to reach their missile launch altitude inside one of their own SAM site coverage zones. I'll give this a try. I did set the speed to Mach 0.85. I'll bring it down a bit a see what happens.
  22. I'm working on a mission and I keep getting strange behaviors from my AI bombers. I have waypoints set with altitudes of 15,000 - 35,000 feet, but some of the bombers are flying nap-of-the-earth down in the valleys, sometimes even crashing into mountains. What information do you need from me to help me solve this problem? Can I post the *.miz file?
  23. I don't have the exact date, but it was sometime in the last couple of months.
  24. It's a recent Win 10 update that has caused graphics problems for some users. I had some problems after Win 10 installed KB5001330. I cured the problem by moving the system paging file to a non-OS SSD. Win 10 had assigned it to the only HDD in my system. I don't know if that problem was caused by KB5001330, but the timing seem coincidental.
  25. I think that's a great idea. The old Command & Conquer series had an entire collection of maps to use for mission making, as well as an editor. It made for some great terrain or scenario missions like the ones you've listed.
  • Create New...