-
Posts
305 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by TeTeT
-
You need to get the center point of the trigger and the point you want to get the distance to. I use the following function to get the distance to a point from the player pos. If player pos is not defined, nil is returned. -- getDistance to player huey function getDistance(point) local dist = nil local playerPos = getPlayerPos() if playerPos ~= nil then local px = playerPos.p.x local pz = playerPos.p.z local zx = point.x local zz = point.z dist = math.sqrt( (px - zx)^2 + (pz - zz)^2 ) end return dist end
-
Another update Another update, this is basically beta now, I do not plan to add more tasks or anything, just some polishing and adding the voices. uh1-maikopp-lua.miz
-
I haven't found anything in the documentation on these two topics. Is it possible to: open and close the Huey doors from Lua? Set damage to/failure of a particular system from Lua?
-
I guess bearing is the heading of the unit, so any value from 0 to 359 should be fine.
-
Quick update: with help of the sct plugin for MIST troops can now be seen at the LZs. Land at a LZ and wait for the next update (max 10 seconds) to have the troops loaded or unloaded. Currently there are no animations, e.g. waypoints, so the troops are static. Anyone interested in some voice acting? I would love to get the following takes: Copilot (German speaking English): We're under fire. Copilot (German speaking English): Let's return to base, shift is over Copilot (German speaking English): Let's get started Squad leader (US English): Let's go Squad Leader (US English): All aboard Squad Leader (US English): Get out of here quickly Squad Leader (US English): Glad to be on the ground Squad Leader (US English): Thanks for the ride Officer (US English): (slightly drunk) Let's go home Officer (US English): Let's go and have some fun If interested and you have ideas of your own what troops and officers could chat during the flight and especially before take off and after landing, any input much appreciated. I guess with the lack of infantry animations, voice acting is the best way to overcome the lack of immersion. uh1-maikopp-lua.miz
-
Looks great and a simple example with sct.cloneInZone worked just fine. How do I get a handle on the new group, so I can deactivate it at will? Maybe the teleportToPoint function could return a handle, which is the chained through the cloneInZone to the caller?
-
Deploy troops anywhere with the Huey, possible?
TeTeT replied to Robert1983NL's topic in Mission Editor
Is there any documentation for the data format that coalition.addGroup uses? I guess that's the big question on getting troops spawning around a Huey without use of predefined trigger zones. From Psyrixx code example I take that it is a rather complex structure, looks like a dump of a game internal object. -
The problem with the LZ readouts are that they are approximate distance, not reliable. You need to stay in a 20 meter radius around the smoke, not the flares or the readout. Looks like RL will interfere and I'm not so sure when I will be able to continue working on it. Don't expect updates soonish. Sorry.
-
Thanks for the encouraging words. I created some Arma missions with a similar approach, based on the Workhorse mission for OA by BTK. Kind of interesting to do something similar in DCS. Attached is an updated version where the LZs 9 to 14 should actually work. I haven't found a condition for 'landed', so I check the altitude of the helo. Right now one doesn't even need to stop at the LZ :) Another problem are the flares. When I place them in the editor on a trigger zone, they start from its center. However, the point I get from the DB seems to be slightly off or the flares seem to start underground. Lastly, I tried to spawn two soldiers at the LZ, but it didn't work. I took the code from a mission discussed below in the forum: uh1-maikopp-lua.miz
-
Please help me with this mission... Trigger actions
TeTeT replied to Robert1983NL's topic in Mission Editor
The attached mission utilizes two scripts, mist and debug. The debug script looks like this: function main() message = "DEBUG\n" flag1smokeout = trigger.misc.getUserFlag("1") flag10firstdead = trigger.misc.getUserFlag("10") if flag1smokeout ~= nil then message = message .. "Flag 1 (smoke out) value: " .. flag1smokeout .. "\n" end if flag10firstdead ~= nil then message = message .. "Flag 10 (first dead) value: " .. flag10firstdead .. "\n" end trigger.action.outText(message, 9) mist.scheduleFunction(main, {}, timer.getTime() + 10) end trigger.action.outText("Debug initialized", 5) main() If you want to change it, copy it somewhere on your HD and use the file open browser from within the editor to load it into the mission. I have to dash now, might be back later. GRIZZLY Air Raid-luaDebug.miz -
Please help me with this mission... Trigger actions
TeTeT replied to Robert1983NL's topic in Mission Editor
I try to set it up for you, reporting back later. -
I'm undecided if going the flag or lua datastructure approach is more appropriate. Of course the flag makes it more accessible, as it easier to grasp. But it is harder to build more sophisticated logic. For example, some tasks would benefit from being played in order: scout FARP site transport security team transport workers transport working material insert patrol patrol makes prisoners, transport prisoner back to base insert patrol patrol located weapons cache, bring in demolition squad So a LZ that has been used once might need to be reused later on, after some condition applies. I guess one can model this with the expressiveness of triggers and flags as well, though I suspect that going the lua path makes it easier to understand. But as written above, I don't know yet.
-
Please help me with this mission... Trigger actions
TeTeT replied to Robert1983NL's topic in Mission Editor
I'm a total mission building newb, but what helped me figuring out if the flags work as intended is the following snippet of lua: function() main currentLZ = trigger.misc.getUserFlag("1") returnLeg = trigger.misc.getUserFlag("2") message = message .. "Flag 1 (LZ) value: " .. currentLZ .. " flag 2 (need task) value: " .. returnLeg .. "\n" trigger.action.outText(message, 9) mist.scheduleFunction(main, {}, timer.getTime() + 10) end If you place this in a file and load it as script, it ought to print the current value of flags 1 and 2 every 10 seconds. Of course you may want to change the flags you monitor and/or give them a different name, as flag1 might not be your current LZ as in my example above. Probably there's even an easier way to monitor game state in DCS, but I haven't figured out that one. -
A preview of a small mission that totally neglects the C in DCS. Fly the Huey for transportation tasks solely and have your trusted co pilot talk you to the LZs. The mission is quite incomplete right now, as only the task and LZ management is done. As the mission contains my first steps in Lua, I would be happy to get some feedback on that aspect. The mission is semi-dynamic, the tasks and LZs are selected randomly. But as there are only 14 of them so far, it is more than likely to encounter the same LZ twice over the course of 5 tasks that need to be accomplished. uh1-maikopp-lua.miz
-
I try to get a randomly assigned landing zone via mist.DBS.zonesByName, but the script seems to stop working. Background is I want to give the pilot an update on how close or far it is to the LZ every couple of seconds and/or shoot a flare at the LZ location. I attached the test mission. The relevant part of the code is: flag1Value = trigger.misc.getUserFlag("1") flag2Value = trigger.misc.getUserFlag("2") message = message .. "Flag 1 value: " .. flag1Value .. " flag 2 value: " .. flag2Value .. "\n" if flag1Value > 0 then LZ = "LZ" .. flag1Value message = message .. "flag1 value bigger 0, LZ is " .. LZ -- trigger.action.signalFlare(LZ, 2, "0", 270) zone = mist.DBS.zonesByName[LZ] message = message .. "Zone: " .. zone end trigger.action.outText(message, 10) mist.scheduleFunction(main, {}, timer.getTime() + 10) The script seems to die w/o error at the DBS.zonesByName call. Any help appreciated, my first steps in Lua and MIST. uh1-maikopp-lua.miz
-
What is the easiest way to mark a LZ temporarily? In the attached example mission smoke is created for the chosen LZ. But the time it takes the smoke to disappear is too long. Any other ideas on how to mark a LZ until the pilot has landed? [edit] Can a kind moderator move this question to Mission Builder's Corner? uh1-maikopp-trigger.miz
-
Video impressions for campaign mission 2 Video impressions half way through for mission 2, guess what happend ... Happens when you get your flight diploma by throwing dice vs the instructor and not proper training ;)
-
Is the purpose any different from http://en.wiki.eagle.ru/wiki/UH-1H_Huey_Guides,_Tutorials_and_Reference_Documents ? If not, might make sense to update the wiki with these posts.
-
One way in... One way out.. curvatures that worked for me
TeTeT replied to WildBillKelsoe's topic in DCS: UH-1H
Very nice. If you didn't lose a drop of sweat at about 4 minutes, I did - merely watching it ;) -
Thanks, Sven2157, for the additional insight, quite informative. With start the APU and engine in parallel, I meant to start these up while the CDU and EGI initializes, not to start the APU and engine themselves in parallel. I learned over the last days that you can just call the ground crew while the cockpit canopy is still open, no matter what radio setting there is. Plain old mk.I voice seems to do the job quite well. So my first step now is to ask ground crew to apply ground power, then switch battery on, do the warning system and fuel checks, then startup CDU and EGI.
-
You can speed it up some more by asking the crew chief to apply ground power at the start of the procedure. After turning on battery power, switch the black knob at the left aft of the console to intercom and ask via radio to apply ground power. With that you can start the CDU and EGI systems right away, so the time for the calibration is no longer noticable, as you can start the APU and engine in parallel. Once the engines are online supplying power, you can ask the chief to turn of ground power. Don't forget to turn the black knob back to VHF.
-
It's an airforce base in the US: http://en.wikipedia.org/wiki/Nellis_AFB
-
Hello, I'm struggling to get across the mountains in that mission. While I can climb up to 4km when I start and immediately ascend, my timing to perform this when needed is off. Any advice on where to be at what altitude in that mission to finally climb over the Caucasus ridge to Georgia? :pilotfly:
-
smithcorp, it is in the forum's mission and campaign topic. Or direct link: http://forums.eagle.ru/attachment.php?attachmentid=22749&d=1229794103
-
Thanks Viper, just completed my first mission on realistic mode :)