Raven68 Posted May 19, 2011 Posted May 19, 2011 Hello community. I am a novice to this mission editor, but have managed to use the nodes and templates to quickly generate some nice single player missions. I have a question as to how to get triggers or usage of scripts to spawn objects, in my case vehicles, at a desired location when another object enters a zone. Here is a scenario I am working on. I have an airbase that is occupied by enemy forces. I have cargo planes and/or shipping docks near this airbase. When the ship and/or plane parks at or near the airfield I wish to have a group of enemy ground forces to spawn and move forward into the battle. In essence a mini campaign. I know there are some great mission makers here that would hopefully share a technique or two to help me to get this to work. Thanks, Raven68 :notworthy: Intel i5-9600K @ 3.7GHz; Gigabyte Z370XP SLI Mobo; G.SKILL Ripjaws V Series 64GB (4 x 16GB) 288-Pin DDR4 GIGABYTE GeForce RTX 4080 16GB 256-Bit GDDR6; Thermaltake Water 3.0 Certified Liquid Cooling System Windows 11 Professional HP Reverb G2 /TrackIR 5 in case VR dies; Thrustmaster HOTAS Warthog w/ Thrustmaster T-Flight Rudder Pedals
Speed Posted May 19, 2011 Posted May 19, 2011 You need to create a group for every enemy unit that can spawn. Set the start time of the unit to some time in the far future (it can be many, many days), then use the "group activate" trigger action to make the group appear when you want them to. Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc.
Raven68 Posted May 19, 2011 Author Posted May 19, 2011 You need to create a group for every enemy unit that can spawn. Set the start time of the unit to some time in the far future (it can be many, many days), then use the "group activate" trigger action to make the group appear when you want them to. That's a fairly simple approach and I appreciate the feedback. :) Do you have any methods to an approach based on another objects condition (destroyed or not destroyed) in a area that will start a timer on another object to spawn in? Intel i5-9600K @ 3.7GHz; Gigabyte Z370XP SLI Mobo; G.SKILL Ripjaws V Series 64GB (4 x 16GB) 288-Pin DDR4 GIGABYTE GeForce RTX 4080 16GB 256-Bit GDDR6; Thermaltake Water 3.0 Certified Liquid Cooling System Windows 11 Professional HP Reverb G2 /TrackIR 5 in case VR dies; Thrustmaster HOTAS Warthog w/ Thrustmaster T-Flight Rudder Pedals
Ripcord Posted May 19, 2011 Posted May 19, 2011 (edited) That's a fairly simple approach and I appreciate the feedback. :) Do you have any methods to an approach based on another objects condition (destroyed or not destroyed) in a area that will start a timer on another object to spawn in? You might spawn enemy units based on the condition of friendly ground forces advancing into an area (reaching an objective). Or using your mission scenario, find a way to set a user flag when the ship and/or cargo planes reach the area of their destination. You will need to create a destination area for these units. Then create a trigger that spawns your enemy units, based on the condition of that user flag being set. In the case of the cargo plane parking, the area objective might not be best, as it will set the flag when the plane flies over the airfield during its approach, or as it enters the pattern. If you don't want the flag set until it actually parks, you will need to add a second condition that the cargo planes is (1) inside the area and (2) speed is near zero. Ripcord Edited May 19, 2011 by Ripcord [sIGPIC][/sIGPIC]
Speed Posted May 20, 2011 Posted May 20, 2011 That's a fairly simple approach and I appreciate the feedback. :) Do you have any methods to an approach based on another objects condition (destroyed or not destroyed) in a area that will start a timer on another object to spawn in? Well, what triggers you are going to use is entirely dependent on the mission. Check out the GUI manual for description of common trigger types, conditions, and actions. I don't personally use any trigger templates or examples really for anything, as I just usually make the logic up on the fly as needed. But uh, as far as timers go, the way you do a timer is that you set a flag in one trigger, then do a "TIME SINCE FLAG(flag, time)" type condition in another trigger. "TIME SINCE FLAG( Flag: 50 Time: 300)" condition should be "read" as: "If the time since flag 50 was turned on is greater than or equal to 300 seconds". Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc.
Recommended Posts