-
Posts
235 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Lineaxe
-
I reduced the traffic to that airport and then the newer versions came out and I don't have the problem anymore
-
Hi , When I completely kill off a ship it generates a message saying it is completely destroyed . The ship burns for a bit and then leaves a Half sunk skeleton in the shipping lanes. They cause me problems since Harpoons seem to get attracted to them and won't point at live shipping. They crowd the shipping lanes (and stop some ships I am sure). I want to get rid of these objects , whatever they are, where ever they are , I want them to sink to the bottom of the cyber ocean. Does anyone know how I can kill them outa the database or whatever method I can use ? Since the ship respawns and moves about elsewhere how can I even find the name of this "Half sunken" object so I can delete it?
-
would someone reply to this topic with a method of disabling the whole of tacview ?
-
Heh, I think I have written some code that is causing this problem. Now I have over 3500 lines of code and several Schedules, functions and tons of Variables sprinkled liberally about in the code , most of them behaving nice enough update: Amazing it cleared those weird messages right up ! err it says its my solution , but it's not !! ...
-
Hi , I am really stuck when I get this particular error message from the dcs.log . I don't know what line in my code has caused it and I have quite a few scheduled functions going on . So how can I find out which one of them is causing the attempt to index field '?' (a nil value) error? Out of those messages How can I use the stack traceback to show me which line Or where Or when Or what Or why (or even who? , although I suspect that might be me ) . Help ? 2021-12-10 17:29:40.930 INFO SCRIPTING: Error in SCHEDULER function:[string "C:\Users\username\AppData\Local\Temp\DCS.openbeta\/~mis00004FCC.lua"]:66209: attempt to index field '?' (a nil value) 2021-12-10 17:29:40.930 INFO SCRIPTING: stack traceback: [string "C:\Users\username\AppData\Local\Temp\DCS.openbeta\/~mis00004FCC.lua"]:9725: in function <[string "C:\Users\username\AppData\Local\Temp\DCS.openbeta\/~mis00004FCC.lua"]:9721> [string "C:\Users\username\AppData\Local\Temp\DCS.openbeta\/~mis00004FCC.lua"]:66209: in function <[string "C:\Users\username\AppData\Local\Temp\DCS.openbeta\/~mis00004FCC.lua"]:66177> (tail call): ? [C]: in function 'xpcall' [string "C:\Users\username\AppData\Local\Temp\DCS.openbeta\/~mis00004FCC.lua"]:10078: in function 'onEvent' [string "Scripts/World/EventHandlers.lua"]:13: in function <[string "Scripts/World/EventHandlers.lua"]:11>
-
in LUA get airport resources for jet fuel level
Lineaxe replied to Lineaxe's topic in Mission Editor
I found that the Rats are too hard to predict and control & they affect the resources at each airfield. So no luck with creating any useful classes up in lua ... -
The latest revision of a mission I created (Chop-U) has been running quite good these . But this time around after 9hrs of running several planes started circling Al Dhafra Airfield and would not land. I suspect A Christian Eagle which has habitually circled around before without landing. Never been an issue until this time around when it seems to be blocking all the other aircraft from landing as well. I hate to re-route it to elsewhere. Anyone got any suggestions ?
-
in LUA get airport resources for jet fuel level
Lineaxe replied to Lineaxe's topic in Mission Editor
I wonder if we can massage the data that would come from a function that calculates that into a Warehouse.getByName('whatever'):getEstimateFuel() for someone else to build upon and maybe even refine . I will fiddle with creating up a function that accepts warehouse name , refueling jet name, as an input parameters and spits out multiple return values that could be used . It will go into ChopU missions and will be well commented out. Thanks for that info. I think it is good enuf to send out refueling planes. -
Has anyone discovered a way in LUA to search an airports resources for jet fuel level ,etc? I would like to monitor the level and send in jets filled with fuel to refill it when needed . I know resource management does this a different way as well , I am hoping to add this feature into my mission. That is , where it becomes necessary to protect the Jets supplying the fuel into a chain of Airports otherwise they starve of fuel and can't launch anything until another Jet can land to refuel it.
-
Oh, heh on those left shifts , I got carried away. At one point we were writing in Machine code for a 32k microcontroller. We hired in a new graduate from a local university and they had just started dabbling in the C language. (before that they ran Pascal,Fortran and others on the mainframe there) . So, we spent some time performance testing the Machine code that was generated from some optimized C code. (It was quite similar to what we were producing in a number of cases ) . So I always have that in back of mind when I write in C,C++ and others. I have only coded in Lua about 18 months or so now, but I believe I have read that it is a language that gets converted into C code. That part I do like , since I can generally get an idea of what the C code will turn into. Now, if DCS is using Lua in a different way than churning the Lua into C code. Well, I have much to learn about the DCS engine. Took me long enough to write up a decent mission with the MOOSE stuff Oh, also I checked to see if my code had defined UNIT anywhere to conflict with the eventhandlers Usage of it . It was the only place in the code that UNIT was used. Anyhow a UNIT test for nil did stop the error in the dcs log & I read recently (somewheres) , that a nil check for UNITS & GROUPS existence is probably a good idea.
-
I was working with 2d coordinates. and thus they are x and y. Also was Testing out the various functions as well, in particular the GetHeight function for a unit which has worked quite well for me (sea or ground) . Of course the Vector differences also would work . Now, when I wrote up the code I had to get at the position data to find out what the downed choppers data even looks like and why it was behaving the way it did. Now that multiplying of the Vector X & Y data translates to some shift lefts and whatnot (in machine code) and so that part of the code runs quickly . Most importantly, by looking over the raw data, I quickly solved the positional error problem without going over to a Vector math solution Seems I would have to test the resultant vectors OR the multiplied positional data that comes from Vec2.x and Vec2.y and the GetHeight function that I was using I guess. Now I will have to go over your new code for this . I am pretty sure that Vector and well, any maxtix math runs much quicker . After all the graphics card are designed to gobble matrices up
-
I tweaked the code to check the position of a downed chopper (half of one anyhow) . It required me to multiply the Vec.x , Vec.y, and Height by 100,000 and then taking only the integer portion of the result. I found that I needed to modify the test for Vec.x & Vec.y to test for small variances in the calculations coming in . So I test both against the previous results +/- 1 . If one of them is outside of this range, the chopper is moving about. If not , it is on the ground (probably broke up on impact after a safe landing?). Anyhow after looping thru the test X amount of times the counter counts down to 0 and at that point it Destroys the Chopper. Thus Allowing me to reset the group of enemy aircraft to respawn another wave of attacks. ~~I have designed it so that all units in the group need to be destroyed b4 a new wave of aircraft come in to attack. (no code here , but you can check it inside of my mission ~~ release 210811 or greater ). I also use very similar code to handle a MOOSE EWR mission type of bug that crops up. The Moose generated Aircraft seem to get stuck at times at Liwa Airport and won't move. So, now I can test their position and remove them if they don't move after a period of time. It seems to me the airports repair themselves after they get damaged. I noticed this at Al Dhafra. So, just removing up those stuck Aircraft should help clear the flow of traffic going through it .
-
Hi cfrag , I found that running the code does require another bit of code so that it would not send errors to the dcs log. This is to (hopefully ) get rid of the bug --SCRIPTING: Error in SCHEDULER function:[string "C:\Users\xxxxx\AppData\Local\Temp\DCS.openbeta\/~mis00005FAD.lua"]:64617: attempt to index field '?' (a nil value) ~~I put in a simple check on the Unit to see if it exists before destroying it. Since I put that into the code I have had no bugs in the dcs log show up , so far parashoo = {} -- remove parachuted pilots after landing function parashoo:onEvent(event) if event.id == 31 then -- landing_after_eject if event.initiator then if Unit~=nil then Unit.destroy(event.initiator) end end end end -- add event handler world.addEventHandler(parashoo)
-
toutenglisse , I will look into adding in mist . That should add even more action into my mission, Chop-U (a Helicopter/Jet based 2 player coop) . Also heard that they are releasing another chopper very soon & so I will be adding in missions for it I have much artwork to add into the briefing -- some images for each sortie that I have in text in the briefing.
-
Sure can add in detail. Your last scenario sounds very close to what seems to be happening , I guess. You see the 1/2 of their chopper that has been shot down is on the ground right behind its pilot. Now , it takes a while to shoot an enemy chopper down like that & it takes flying the mission many times with several respawns of the group of choppers in each mission before that event occurs. Most of them just die in the air, or fly down with smoke. So I did write some code which tests to see if the chopper unit IsAlive and continuously checked to see if it's coordinates vs it's last stored coordinates are equal ,that is, it has not moved since the last check. After X amount checks that are found equal, it then Destroys the unit. I am part way through testing out this new code and have found that it seems to think it's moving under those conditions. I have taken tanks & landed choppers right beside it so I can see that it aint moving Anyhow, I am testing my code but I need to get the chopper shot down like that in order to turn on the diagnostics (I set a switch on the F18 to trigger a Flag I can then monitor ). Now , the whole thing is some kinda DCS bug , really. I mean when a chopper is shot in half and on the ground and somehow magically can't be shot at , run over or killed off in any way. Well, that's gotta be a bug . I know, I have written several of 'em myself in the past ?!
-
Hey, I fit that into my code quite nicely and it seems to get rid of all downed pilots after they stand up. Now, here is a similar problem I was having with shooting down helicopters. Somehow , half of a helicopter would end up on the ground with a pilot standing beside it .(These choppers are late activated and respawn throughout the game . ) The Unit shows up as being alive , when I do tests on it ,but of course it can never move again. So I quickly wrote some code that after some repetitions through a timer loop would destroy the unit. Alas, somehow , I think that it thinks it is moving (changing coordinates) . But , I am hoping that this code you posted may actually take care of those kinds of problems as well. Well the pilot stands besides the downed chopper , and maybe getting rid of him would do it ? Could be a different sort of problem ...
-
I am using the moose engine and am wondering if adding in mist would slow up the running of the mission. Must admit I have wanted to use it. I am forced to use mission editor to get cockpit controls for example. So combining mist with moose, does it affect the performance ? If it's a little bit, that's not so bad.
-
I have a mission I wrote and Pilots from both sides (red/blue) land on the runways at Al Dhafra at times. When that happens the airport shuts down. And I mean FOREVER. never to work again ! I once removed a pilot by picking him up with the skids of a Uh-1 and dropping him down again from 1000 ft or so ... I once got rid of one by driving over him with my F18 Falcon. But now , I have another one from our side (blue) stuck on the runway . Tried mowing him down with a tank, and tried the Uh1 again . No luck !!! I would love to write some lua code to be able to perform a Rescue on team's pilots. and just Squish enemy since you cant shoot at them . otherwise a downed pilot STOPS the ENTIRE Airport at Al Dhafra ,which is a large part of the mission...
-
I should mention here that I have resolved the problem. I rewrote my lua code and created some core functions I could use on all vehicle types. And when I tested the code with the enemy ships I could respawn them a random period after they die. The code works pretty decent with the templated shipping vehicles so far.
-
access to OS:time without having to comment out the sanitize code
Lineaxe replied to Lineaxe's topic in DCS Core Wish List
Going back over this thread . It turns out, as many here know , the DCS core engine is written in C++ . Anyhow, I would be happy to code something in C++ that would just access the clock info only. Having ReadOnly info from it available would not compromise the existing code I am sure & would even be advantageous. Heh, I know that I would use it right off the bat with my lua code . -
Well I put it in to attack my Air Assets in the vicinity & It was doing that for the last 14 months. But, recently it has started firing those shipwreck missiles on a distant fleet of mine. So, I can't really move the fleet off the map. I just want to dis arm the shipwrecks from the carrier's munitions or decrease it's engage range back to where it was not firing. I hate to pull the carrier out of the mission as it was in it right from the missions inception. But , cease and desist or face the DELETE button. And, in version 2.7 is has started moving about in the Bay North of Al Dhafra again.
-
just Recenty the kuznetsov is attacking my carriers with shipwreck missiles . I want to take them out of the ships munitions ,but cannot find an entry that will allow me to tell it to not carry these munitions on board and thus stop shooting them at my fleet. In prior than 2.7 versions the carrier never shot these missiles at them. Perhaps I can decrease it's radar range ? Maybe that is why it has started to shoot at my fleet a fair way across the map. Anyhow , is either solution possible?
-
Switched my mission to start at 08:00 in July . I can track shipping and tanks in daytime even with a bit of weather conditions added. I am hoping that they will re-implement the FLIR for hunting at night. Most of my sorties, as I have mentioned are done at 21:00 in December. They are all situated around Al Dhafra/ vicinity & are in various vehicles. So not tracking at night means reloading the map for implementing the Litening Missions I guess, as a solution for now. I noticed that the carriers are now moving about in the bay North of Al Dhafra. They had stopped for a bit in the later 2.5.6 beta versions. Now they seem to have more weapons & are moving like the targets I want em to be Much appreciated !!! Once again, I will say that I am willing to help troubleshoot /code/etc with the main DCS engine. I wonder where I can dig into that subject ?
-
I might mention here that I have coded in DirectX since Directx 2 version. I have coded in C++ for over 30 years. (Since Borland 3.0) and ,well, I could probably write some code to fix this issue. I just gotta get at their framework. Oh,I also use Blender & 3ds Max for my 3d modeling needs . Blender rocks now for a free package. Tons of options in it and one can always download and install other features into blender. I like the one that lets me browse through online textures and then it downloads & puts the texture onto any selected surface ... Yup, Blenders pretty good these days
-
eek, Well I wrote up a mission using over 3000 lines of Lua over the last 12 months. And not having the PTRK work at night kind of throws a monkey wrench into all the effort I had put into researching, coding and writing up the instructions for each sortie. The mission looks best at night time, and so I play it at that time. It makes carrier landings more fun and so on. So I have to lose all that and play in the daytime ,since they changed the way the Litening works? Not very happy to do that at all, to be honest with you.