-
Posts
235 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Lineaxe
-
OHH some guru of DCS take pity on my lowly post and submit an answer to my conundrum here...:)
-
Hi, In my mission I am writing we tend to crash a bit and use the slots to join back in again instead of restarting the whole game. In some places in my lua code I would like to find out what plane/helicopter/tank each player has selected and is inside of at the current moment. Since we do die and switch around, that is . It sure would make my current code smaller and smoother if I could get that information , I would think.:noexpression:
-
access to OS:time without having to comment out the sanitize code
Lineaxe replied to Lineaxe's topic in DCS Core Wish List
Hmm, what I am using it for , I am thinking should actually be patched in thru C# (into the XNA code) for DCS as it makes DCS even better than it is. -
access to OS:time without having to comment out the sanitize code
Lineaxe replied to Lineaxe's topic in DCS Core Wish List
Heh, gotta admit I like that so much I thought I would just reformat all the info you gave me back into the lua file so everyone can just grab it and use it with it's instructions. :blink: desanitizer_hooks.lua -
access to OS:time without having to comment out the sanitize code
Lineaxe replied to Lineaxe's topic in DCS Core Wish List
Hi , I went over that video. It has a lot of good information in it. Well, I have only coded in Lua for about 3 months now, and all of it related to DCS . While google searching , I found that people were communicating between c and Lua . (C++ as well , but with way more libs needed it seems). So I thought that might be a good approach. I haven't really played around with installing custom campaigns yet ,such as described in the video you suggested. IT seems ,in the video he is changing over the names of io & lfs to some test ones that he then refers to in his example campaign's lua files. I think I like this approach , it does make it safer than having the comment out lines in MissionScripting.lua . However, MissionScripting gets rewritten every time they do a patch upgrade , any modifications at all to it will be lost until you write the new copy over. With a c to lua interface I can call the c code's functions anytime I need inside of lua and get the results I need without having to keep on having to copy over the MissionScripting.lua file every time there is a patch upgrade,(which seems to be quite often). Now with DCS, Is it possible to interface c to Lua code. Are people doing it here, as they are in other lua environments? A better overall option , I think , would have DCS to allow those who write up the mission an option to copy their NEW missionScripting.lua file over automatically. Not manually , every time .. -
Well, I tried out some code to move some Statics up in height from their original location I placed them in using mission editor. I tried Respawn & Spawn methods which I have used elsewhere in the code with success. This time it moved them to the new location and somehow duplicated them and stacked the new statics on top of the ones I had moved. It flagged errors for each static object that got moved that started with the error table index is nil in function AddInDatabase in function xpcall in function onEvent in function ReSpawnAt in function tail call in function xpcall (note I skipped a lot of the blah blah in between) Anyhow it flags those message in dcs.log based off the table index is nil error. Now I had just used the point based table to move the static, and it moved it, so I don't know why it would be nil on the next line of code which is the call to method ReSpawn. Anyhow , these errors show up ONLY once when the mission starts up and the result is something that I really like. That is the double stacking of the statics . Some of them happen to be oil tanks as cargo loads. When I go to pick them up with the sling, If I am a bit careless with one on the top row, it topples off ,falls onto the deck and blows up !!! Well, Ok the code might be a be funky, but I just Love what it does now!!! Just thought I would share :vertag:
-
Hi, I really would like to get access to OS:time and only this OS:feature at the moment. I am thinking I can just write some C code to do the call to OS:time and then integrate that with the rest of my lua code. Otherwise I am having to comment out the following line in the Scripts/ MissionScripting.lua file -- sanitizeModule('os') I will post this in the Wishlist area and post links to it in a couple of other forums as well (I think) :chair:
-
Late answer may help future readers of this post. Moose.lua is to be loaded separately , ahead of the your lua script in the mission .miz file. It's very likely that you need to download it and keep it in your missions directory as is done in this example. Take a look at the triggers.
-
converting lua to c and running c through a do scriptfile
Lineaxe replied to Lineaxe's topic in DCS Core Wish List
well , i did want to run tests to see if there is any speed increase. In general, compiled code runs quicker. The whole openGL got written in C , so it could port into as many languages as possible. C rocks still , hard to believe , heh . -
oh shagrat , my brother and myself started out in 1980's flying JET for the Ibm pc on a floppy disk with just a mainboard ,cards to run stuff and a think it was like a 63w power supply. No case either when we first ran the software thru dos. Been flying off and on ever since :) I loved IL2 for flying and BFVietnam for the chopper and tank attacks.
-
great information!!! I will dig into TacView . I had kinda suspected that the code hasn't been produced yet for handling dynamically spawned objects. So , you guys can't watch the debriefing through dcs as well , I guess . I am glad that there is some kind of work around that I can use . In my mission the tanks and aircraft are on random templates so it is not really affected by showing hidden unit positions. However, I am sure that many other missions use different setups.
-
when I run missions using moose framework the end game debriefing window uses numbers to describe the initiators. So I don't really know WHAT hit me. I can determine somewhat from the type of projectile I was hit with. That is not a very accurate way to do so. Also I can't seem to watch the mission afterwards , due to this numbering , I imagine:joystick: How are you others handling it ?
-
Heh, ok , sorry , Hope we can clean up the couple that I did make. I will make references from now on :) Thanks for the quick reply!
-
Cleaning up my old duplicate posts ? Hi , sometimes I am not sure where to post a question and so I have duplicated a couple of posts. Am wondering if there is a way, in the 2nd forum, to just refer to the original post? Also how can I clean up any of my old possibly duplicate posts here?
-
Have any of you managed to get MENU structures working in Multiplayer? The only example I could dig up so far uses MENU_GROUP & MENU_GROUP_COMMAND . In the comments he says that multiplayer won't work at the moment due to a GROUP bug . A Moose or dcs bug I would imagine he means. Anyhow, I am looking for working syntax to use predefined Menus inside a multiplayer game. :music_whistling: Should be the last thing I need in the mission before I can upload it. Have any of you managed to get MENU structures working in Multiplayer? The only example I could dig up so far uses MENU_GROUP & MENU_GROUP_COMMAND . In the comments he says that multiplayer won't work at the moment due to a GROUP bug . A Moose or dcs bug I would imagine he means. Anyhow, I am looking for working syntax to use predefined Menus inside a multiplayer game. Should be the last thing I need in the mission before I can upload it.
-
you are right. Now for the mission I am writing for myself and my Brother I have no problem re-enabling os . I agree with you, someone may want to write bad scripts through os. But we are just going to write 'fun' ones :)
-
the routine I posted reverses the last digits and uses them AS THE SEED for the random number generator. As I mentioned, and it can be found on one of the LUA forums :)
-
StaticObject.getByName finally works with flaggina an error
Lineaxe replied to Lineaxe's topic in Mission Editor
I was looking into the cargo hook unhook with such things as REMOVE BULLET RIGID BODY and add soft body constraint and the like . Brrrrr.... I seem to be digging into some weird things.. And I just posted something on removing the Tires from a zone radius after a scheduled time. I still have to get used to the lua syntax in the first place .... Brrrrr..... nice sample code I must admit ... Thanks !! -
Been trying to remove the tires from a zone that already had them created originally like so... zoneObj=ZONE:New("SelectedZONE"):BoundZone(32,country.id.USA,false) -- zoneObj=nil garbagecollect() -- tried putting these two commands in all over the place zoneObj=ZONE:New("SelectedZONE"):BoundZone(32,country.id.USA,true) this one flags an error that says it can't find a table ? Anyone know a good syntax that I can use to have the tires disappear from the zone after a scheduled amount of time ??? Even if I could kill the zone itself as it is not being used after the tires are destroyed... Nothing I tried has worked , so far...:D
-
You can try using my random generator code found in another one of my posts .. it gives you the Option of using one of several random generator methods
-
Would these kind people make sure that we can get all the missing audio files that the DCS.log keeps flagging as Errors which state that DCS cannot find them in the pathway specified?
-
missing audio , the dcs.log file shows the following errors ? Where can I get these Crucially needed files ? 2020-06-10 23:49:46.284 ERROR SOUND: can't load wave: "speech\eng\common\external cargo\messages\cargo_hooked" 2020-06-10 23:50:01.690 ERROR SOUND: can't load wave: "speech\eng\common\external cargo\messages\thirty_to_ground" 2020-06-10 23:50:04.801 ERROR SOUND: can't load wave: "speech\eng\common\external cargo\messages\sixty_to_ground" 2020-06-10 23:50:27.445 ERROR SOUND: can't load wave: "speech\eng\common\external cargo\messages\cargo_is_unhooked" :noexpression::huh:
-
The dcs.log file can't find sounds and a search of my drives show they are not there Sooo, where are they ? Heheh, We bought the chopper now where is the sound ? sometimes a message comes up , but these messages are crucial to know and are flagging as errors in the dcs.log . Anyone know where I can get them from ? :helpsmilie: