-
Posts
1724 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by TEMPEST.114
-
function IsTargetLeftRightOrParallelOfTrack(playerUnit, targetUnit) -- Left = Positive Right = Negative Parallel = Zero local pVec = playerUnit:getPosition().x local tVec = targetUnit:getPosition().x local result = VecDot( { x = 1, y = 0, z = 0 }, VecCross(pVec, tVec)) if result > 0.001 then return Side.LEFT elseif result < -0.001 then return Side.RIGHT else return Side.PARALLEL end end Is this okay?
-
Wuss. Plus incorrect wuss; AI isn't the future of Humanity it's the end of Humanity. function IsTargetLeftOfUnit(unit, targetUnit) local angle = math.atan2(targetUnit:getPoint().y - unit:getPoint().y, targetUnit:getPoint().x - unit:getPoint().x) local direction = "" if angle < 0.001 then direction = TUC.Side.LEFT elseif angle > 0.001 then direction = TUC.Side.RIGHT else direction = TUC.Side.PARALLEL end return math.abs(angle), direction end
-
Ah. I appreciate it, I DO actually want to learn the maths, but just seeing the formula means nothing to me... but when it's explained and can be applied to a specific problem I understand, then I can internalise it and learn. And I love learning. Thanks for the diagram - not see that but it's SUPER helpful. Don't go throwing expensive words like 'collinear' at me... I have no idea what it means and I'm sure I can't afford it.
-
Yet another thing we can't rely on. The mission has two lines - one red, one green. The start/end lines are on airports and the 'mapx' and 'mapy' perfectly align with each line segments STARTING position, but the rest of the points don't match and some are - for some unfathomable reason - just 0,0. Now the drawings correctly persist in the miz, which leads me to think the output that you get from env.mission.drawings is broken and giving wrong data. DrawingsExample.lua DrawingTest.miz
-
It should either play them sequentially (best) or (with an option) over the top of each other. At the moment, it will only play the last one in the list. ie. function PlaySounds() trigger.action.outSoundForCoalition(2, soundKey1) trigger.action.outSoundForCoalition(2, soundKey2) end Only soundKey2 plays. The play sound system is unfit for purpose because we can't sequence sounds to play immediately after each other and we can't know when a sound has finish and now we can't even play two sounds at the same time.
-
Wrong. Because I create a mark using ID number 1. It shows on the map. I remove it using trigger.action.removeMark(1). It goes away. Then I create a new mark on the map using ID number 1. The 'event' table says 'mark added' but nothing renders. If I increment it to 2 then it renders and I can remove it. If I try later to add another mark, now with either 1 or 2 they wont render, but 3 will. So on, so on.
-
I don't know if it's because you moved 'mapResource' out from the root or you're not searching in that folder, but there is no apparent way to get hold of the blue/red/neutral briefing images - as you claim should be available from env.mission i.e. pictureFileNameN : table : Neutral coalition briefing images pictureFileNameB : table : Blue coalition briefing images pictureFileNameR : table : Red coalition briefing images env.mission gives the DICTIONARY KEYS but there is no way to use them to get the corresponding 'item' from the mapResource file. I don't even know why you're using a dictionary for filenames anyway as it's not like they are localised in any way. This is either a crazy but broken design idea, or it's a bug. But file names shouldn't be localised or need a 'dictionary' key. e.g. There is no way to resolve these keys...
- 1 reply
-
- bug
- getvaluedictbykey
-
(and 1 more)
Tagged with:
-
In the case of requiring to play several sounds sequentially, without overlap, then we need to know when the previous has finished playing in order to play the next. Alternatively, add a new 'sequential' sound command such that we can chain up all the sounds that need to be played and just let DCS play them sequentially.
-
- 1
-
-
I'm useless at maths beyond basic trig, so vectors and quadratics and stuff is an immense struggle. I can 'brute force' this by looking at headings and working it out but it's a pain and slow and lots of if statements to deal with the wrap arounds. I was wondering if there is a clever and faster way to tell if - REGARDLESS of your ownship heading - another aircraft or any unit really is on the left of your nose to tail line or on the right side, or even if it's perfectly on the nose/tail line. Anyone much smarter at maths than me know of a cool way? (Bonus gratitude if you can explain HOW the solution works too) Thanks
-
@71st_AH RobBravo. Perfectly stated. War Thunder / Ace Combat people should stay in their lane and not force DCS into that.
-
I have a table of id numbers. Every time I do a new 'mark' I increment the last ID number by 1. When the script needs to remove all marks, it does a for loop where for id = 1, #activeDrawings do trigger.action.removeMark(id) activeDrawings[id] = nil end This wipes the table 'activeDrawings' empty. Then later, if the script adds a new 'mark' it will obviously restart at 1 (as all previous ID's have been removed and deleted). However, DCS Backend won't render the mark. It won't render any more marks until the new ID number is one more than the previous max ID numbers before my table of used ID numbers was wiped. This means the backend is retaining what ID numbers were used, and despite 'removeMark(id)' it doesn't 'free' that up for reuse. Thus, until this is fixed my table of used ID numbers has to keep increasing forever.
-
Users do have a choice. Not to play the mission/campaign. Allowing people to override specific and considered features doesn't help anyone. It dumbs down or breaks the mission and causes support grief or even unfair bad feedback for the mission designer. I'm fully in support of people putting what options are mandatory for a mission as some form of 'checklist', but I cannot give ground to 'because I wanna' as an argument for breaking a well crafted and scripted mission.