jbrking Posted January 2, 2014 Posted January 2, 2014 Could anyone please help me? I am needing permanent smoke markers. As most of you know smoke markers disappear after 5 minutes. Thanks in advance.. Su-27 Flanker 1995 Super EF2000 1997 Jane's F/A-18 1999
SNAFU Posted January 2, 2014 Posted January 2, 2014 (edited) You can use flags and trigger constructs in the ME or you copy and paste the following script lines in the ME and trigger them with something like: ONCE - TIME SINCE START (2) - DO SCRIPT : Insert the following lines if you want to have smoke in the centre of a trigger zone: zonename = 'insert-name-of-zone' -- targetzone name local function SignalTarget() Aimpoint = trigger.misc.getZone(zonename) Aimpointpos = {} Aimpointposx = Aimpoint.point.x Aimpointposz = Aimpoint.point.z Aimpointposy = land.getHeight({x = Aimpoint.point.x, y = Aimpoint.point.z}) Aimpt3 = {x=Aimpointposx, y=Aimpointposy, z=Aimpointposz} --trigger.action.signalFlare({x=Aimpointposx, y=Aimpointposy, z=Aimpointposz}, trigger.flareColor.Green, 0) --un/comment line if flares shall mark the target trigger.action.smoke({x=Aimpointposx, y=Aimpointposy, z=Aimpointposz}, trigger.smokeColor.Green) --un/comment line if smoke shall mark the target return timer.getTime() + 300 end timer.scheduleFunction(SignalTarget, nil, timer.getTime() + 1) Or the following if you want to have smoke on a unit: unitname = 'insert-name-of-unit' -- targetzone name local function SignalTarget() local Rangetarget = Unit.getByName(unitname) Aimpointpos = {} Aimpointpos = Rangetarget:getPosition().p Aimpointposy = land.getHeight({x = Aimpoint.x, y = Aimpoint.z}) Aimpt3 = {x=Aimpointposx, y=Aimpointposy, z=Aimpointpos.z} --trigger.action.signalFlare({x=Aimpointpos.x, y=Aimpointposy, z=Aimpointpos.z}, trigger.flareColor.Green, 0) --un/comment line if flares shall mark the target trigger.action.smoke({x=Aimpointpos.x, y=Aimpointposy, z=Aimpointpos.z}, trigger.smokeColor.Green) --un/comment line if smoke shall mark the target return timer.getTime() + 300 end timer.scheduleFunction(SignalTarget, nil, timer.getTime() + 1) In both cases the names of the zone or the unit have to match the name stated in the script lines. If you want to have white smoke, replace .Green with .White, ir .Red... Edited January 2, 2014 by SNAFU 1 [sIGPIC][/sIGPIC] Unsere Facebook-Seite
jbrking Posted January 2, 2014 Author Posted January 2, 2014 Thanks for your quick reply.. I'm heading out the door now but I will definitely look at this later on tonight. At the moment I have been using triggers and flags and tried various combinations but to no avail. I have been trying to put off the learning and use of LUA for as long as possible. Su-27 Flanker 1995 Super EF2000 1997 Jane's F/A-18 1999
Sabre-TLA Posted January 2, 2014 Posted January 2, 2014 Have you tried with triggers:' Type: CONTINUOUS ACTION Condition: UNIT ALIVE or some other condition determining when to stop the smoke Action: SMOKE MARKER (for zone) or SMOKE MARKER ON UNIT I've used this to continuously pump out flares so I don't see why this wouldn't work for smoke too. 1 MapleFlagMissions - Read Our Blog for Updates
Cibit Posted January 2, 2014 Posted January 2, 2014 Have you tried with triggers:' Type: CONTINUOUS ACTION Condition: UNIT ALIVE or some other condition determining when to stop the smoke Action: SMOKE MARKER (for zone) or SMOKE MARKER ON UNIT I've used this to continuously pump out flares so I don't see why this wouldn't work for smoke too. Thats how I do it generally but replace unit alive to unit or group in zone so it only produces smoke when you return. Ideal for fixed LZ's i5 8600k@5.2Ghz, Asus Prime A Z370, 32Gb DDR4 3000, GTX1080 SC, Oculus Rift CV1, Modded TM Warthog Modded X52 Collective, Jetseat, W10 Pro 64 [sIGPIC][/sIGPIC] Adding JTAC Guide //My Vid's//229th AHB
number3 Posted January 2, 2014 Posted January 2, 2014 zonename = 'insert-name-of-zone' -- targetzone name local function SignalTarget() Aimpoint = trigger.misc.getZone(zonename) Aimpointpos = {} Aimpointposx = Aimpoint.point.x Aimpointposz = Aimpoint.point.z Aimpointposy = land.getHeight({x = Aimpoint.point.x, y = Aimpoint.point.z}) Aimpt3 = {x=Aimpointposx, y=Aimpointposy, z=Aimpointposz} --trigger.action.signalFlare({x=Aimpointposx, y=Aimpointposy, z=Aimpointposz}, trigger.flareColor.Green, 0) --un/comment line if flares shall mark the target trigger.action.smoke({x=Aimpointposx, y=Aimpointposy, z=Aimpointposz}, trigger.smokeColor.Green) --un/comment line if smoke shall mark the target return timer.getTime() + 300 end timer.scheduleFunction(SignalTarget, nil, timer.getTime() + 1) Just curious why do you return time.getTime() + 300? Looks like this function will run every second. However, wouldn't it be best to run this function every time the smoke is about to run out (smoke lasts about 5 minutes)? 1 314-я смешанная авиационная дивизия 314th Mixed Aviation Division: The "Fighting Lemmings"- Forums: http://314thsquadron.enjin.com/ - ED Forum Group: http://forums.eagle.ru/group.php?groupid=119
SNAFU Posted January 2, 2014 Posted January 2, 2014 Sure that`s possible this way and the fastest way to get results, but with CONTINOUS ACTION you produce a smoke every second. Don´t know if that impacts the mission performance, but with flares I prefer them not be fired every second. You can also: CHANGED CONDITION - TIME SINCE FLAG (A)/ 300Seconds - FLAG (A) FALSE and POP SMOKE and FLAG (B) ON CHANGED CONDITION - TIME SINCE FLAG (B)/ 300Seconds - FLAG (B) FALSE and POP SMOKE and FLAG (A) ON Should also work... @number3: The function will be executed after 1 second and repeated every 300 seconds. [sIGPIC][/sIGPIC] Unsere Facebook-Seite
Wrecking Crew Posted January 2, 2014 Posted January 2, 2014 I use Switched Condition instead of Continuous Action. I do think Continuous Action can impact performance. Set a flag at mission start or on a Once event soon thereafter. You can start the smoke on that event, too. Then follow that with a Switched Condition, Condition = Time Since Flag of about 4-5 minutes, Action = Flag On & Smoke Marker. You can include additional Conditions to turn this feature on/off. WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
jbrking Posted January 2, 2014 Author Posted January 2, 2014 Finally!! I use Switched Condition instead of Continuous Action. I do think Continuous Action can impact performance. WC This is true.. While continuous action works it also spawns a new smoke marker every 1 second assuming the conditions are met. I tested it yesterday with a friend and had a considerable frame loss while getting within a few hundred meters. This seems to work: ONCE -> RANDOM (100%) -> FLAG ON (10) SWITCHED CONDITION -> TIME SINCE FLAG (10,290) -> SMOKE MARKER(S) -> FLAG ON (10) As it turns out the FLAG ON command actually resets the value of the flag. knowing this made things sooooo much easier. I'm stubborn and I am trying to put off learning scripting for as long as possible. Su-27 Flanker 1995 Super EF2000 1997 Jane's F/A-18 1999
jbrking Posted January 2, 2014 Author Posted January 2, 2014 (edited) Thats how I do it generally but replace unit alive to unit or group in zone so it only produces smoke when you return. Ideal for fixed LZ's Yes.. I tried originally using "SWITCHED CONDITION" using the "PART OF COALITION IN ZONE" triggers and using "FLAG ON/OFF" but It wont seem to trigger again until the units leave and re-enter the zone for some reason. Ideally the conditions have to be met and then not met which makes the use of the "TIME SINCE FLAG" one of better options it seems. Edited January 2, 2014 by jbrking Su-27 Flanker 1995 Super EF2000 1997 Jane's F/A-18 1999
jbrking Posted January 3, 2014 Author Posted January 3, 2014 (edited) While I have you here.. Now I have peoples attention.. Uncontrolled units show up on radar while powered down on the taxiway.. is there anyway to solve this one? I was having great difficulty locking up targets that were already in the air as it always seemed to lock up random ECM targets 30 km behind the active ones that were actually a threat. It will always lock a target that is still on their respective runway and powered down.. As my mission is going to have many uncontrolled units for both sides for the ground commander to fiddle with this is a big problem for me and effects the overall playability of the mission. In the airplane group under triggered actions I can see silence and radar using actions. Would this be something I need to change? Thanks again.. Edited January 3, 2014 by jbrking Su-27 Flanker 1995 Super EF2000 1997 Jane's F/A-18 1999
Wrecking Crew Posted January 3, 2014 Posted January 3, 2014 ONCE -> RANDOM (100%) -> FLAG ON (10) SWITCHED CONDITION -> TIME SINCE FLAG (10,290) -> SMOKE MARKER(S) -> FLAG ON (10) ^^^ That works, but using the Random as a Condition is an odd approach, but it should trigger at the first second of mission time. Instead, I would use -- Once -- Mission Start -- Flag On 10 -or- Once -- Time Since 10 -- Flag On 10 ^^^ waits 10 seconds after mission start and turns on the flag. I have a few things that happen close to mission start, and I use Time More to stagger them a little bit, over the first 10-15 seconds of the mission. I see you have another post about your new question. As for the scripting -- when I need it, I load Mist (v3_2 now) up at Time More 4: Once -- Time More 4 -- Do Script (with the complete copy of the Mistv3_2.lua file in it) & Message To All (Load Mistv3_2.lua, 1) I run a few scripts to detect things like certain platform types in a zone -- planes vs vehicles vs helicopters vs ships, and for spherical zones for aircraft detection close to a unit or zone, and some other flag control. A zone can be on a moving unit. But the major events in my missions are done with regular events in the editor. I'm attaching a text file that has some of these short scripts. The lua scripts turn a flag on/off, and from there I use the flag as a condition for other things. For the scripts, I use: Once -- Time More 8 -- Do Script You have to load the Mist file first before running any scripts or you will get starting errors. And I will use a different time for these -- 9, 10, 11, etc. I just started using different times to start these, don't know if it really makes a difference. WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
Recommended Posts