Jump to content

Hardcard

Members
  • Posts

    1080
  • Joined

  • Last visited

Everything posted by Hardcard

  1. Build your own headtracking clip, it's cheap, fun, rewarding and works like a charm. I can provide links and instructions if you're interested.
  2. @hydrawind The old cockpit script files that you provided don't seem to work anymore. I get an invisible cockpit now, can you confirm?
  3. You need to monitor dcs.log when testing scripts, otherwise you'll never know what's going on. As for your second snippet, you're using two different spawn methods, SpawnAtAirbase and SpawnScheduled , they're probably conflicting. Also, the correct airbase enumerator is Anapa_Vityazevo, not Anapa-Vityazevo Also, :OnSpawnGroup() is used to execute predefined functions on spawn, but you didn't define any function, so I don't know why you put it there. Try this instead: MiG29_Grp1 = SPAWN:NewWithAlias("MiG29_Grp1") MiG29_Grp1:InitLimit(2 , 99) MiG29_Grp1:InitRepeatOnEngineShutDown() [color="Blue"]-- I don't think this will work, you'll probably need to script it the hard way[/color] local function Scheduler() MiG29_Grp1:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Anapa_Vityazevo ), SPAWN.Takeoff.Hot ) return timer.getTime() + 30 end timer.scheduleFunction(Scheduler, nil, timer.getTime() + 1) Finally, keep in mind that DCS update 2.5.6 introduced several changes that broke core MOOSE functionality, the team is still working on fixes.
  4. It's all in good fun (and yes, YOU ARE) ;)
  5. Ok, ok, I get it... you're masochists :lol: There, I've created Lite versions with increased reflection transparency and included them in the mods, for those of you who can't live without reflections ;) Su-25A ClearHUD + Su-25A ClearHUD Lite : https://www.digitalcombatsimulator.com/en/files/3308353/ MiG-29 ClearHUD + MiG-29 ClearHUD Lite : https://www.digitalcombatsimulator.com/en/files/3308354/
  6. @Fri13 When flying these planes, pilots are already forced to work around several important deficiencies, it makes no sense to add ridiculous HUD reflections to the list. Take the fulcrum, for instance, it has no DataLink, no fly-by-wire, carries subpar R77 missiles (compared to AMRAAM and SD10), has inferior RWR and modest fuel capacity. While the fulcrum's potential rivals in the sky (hornet, viper, eagle, tomcat) don't suffer from this HUD reflection problem, carry better missiles, have Datalink (or similar) and better RWR. @Stratos Glad you liked it
  7. IMPORTANT NOTE: DCS Open Beta 2.5.6.47224 has rendered this mod obsolete, since ED has finally fixed the reflection problem for these aircraft. The mod no longer works and it's no longer needed, so if you're using DCS 2.5.6.47224 or above, this mod isn't for you! I got tired of the sight / HUD reflections of the Su-25A and MiG-29A/G/C, so I decided to do something about it. Since I couldn't find existing mods for these aircraft types, I created my own. These mods allow the user to remove sight / HUD reflections on the Su-25A and MiG-29A/G/C, making them completely transparent. I'm now sharing them with the community, I hope some of you will find them useful! ;) Su-25A: https://www.digitalcombatsimulator.com/en/files/3308353/ EDIT: Added Lite version with increased reflection transparency MiG-29A/G/C: https://www.digitalcombatsimulator.com/en/files/3308354/ EDIT: Added Lite version with increased reflection transparency *Credit to Grajo for the Su-25T clear HUD texture, which I adapted to the MiG29
  8. The way DCS was built, all flyable aircraft use a highly detailed cockpit model for first person view, which is SEPARATE from the aircraft model that you see in external view. The aircraft model that you see in external view has a bare minimum cockpit, it's NOT the same cockpit model that you see in first person view. ED probably did it this way due to limited tech/computing resources back in the LockOn days and general performance concerns. Now, if you've ever modelled, you know that detailed textures need to be tailored to a specific 3D model, they can't be used on different models without modification. This is why you find different cockpit textures depending on your view, they belong to different 3D models.
  9. Your standing with the Militarists and Communists has increased Will need additional llama ranches (their spit is used to produce the paint) Penúltimo has offered to conduct the test flights with experimental sugarcane fuel :D
  10. Su-25A ClearHUD will allow you to remove the reflections of the ASP-17 sight in the Su-25A Su-25T - HUD Glass Mod will allow you to remove the HUD reflections of the Su-25T MiG-29 ClearHUD will allow you to remove the HUD reflections of any MiG-29 type
  11. MiG-29 ClearHUD will allow you to remove the HUD reflections of any MiG-29 type
  12. Su-25A ClearHUD will allow you to remove the reflections of the ASP-17 sight in the Su-25A Su-25T - HUD Glass Mod will allow you to remove the HUD reflections of the Su-25T MiG-29 ClearHUD will allow you to remove the HUD reflections of any MiG-29 type
  13. Su-25A ClearHUD will allow you to remove the reflections of the ASP-17 sight in the Su-25A MiG-29 ClearHUD will allow you to remove the HUD reflections of any MiG-29 type
  14. Yes, ModelViewer2 can be made to generate a description.lua file for the loaded model. Generate model livery file - Ctrl + Shift + Alt + G Worked for me with the Su-25A cockpit model.
  15. @alt.sanity Personally, I'd build a table including the names of all the slot units that should be blocked depending on base flag value. For instance, imagine that we have 3 bases, each with 6 units (3 blue and 3 red) + its own flag (which changes value depending on the controlling coalition). We can set up a table listing all the base slot units from the opposite coalition that should be blocked in each case, then set up the logic. Something like this (required fields marked in red ... also, keep in mind that I haven't tested it) : local Callback_Table = {} local Block_List = { ["Value of Base_1_Flag when blue"] = { ["Red_unit_1"] = true , ["Red_unit_2"] = true, ["Red_unit_3"] = true } , ["Value of Base_2_Flag when blue"] = { ["Red_unit_1"] = true , ["Red_unit_2"] = true, ["Red_unit_3"] = true } , ["Value of Base_3_Flag when blue"] = { ["Red_unit_1"] = true , ["Red_unit_2"] = true, ["Red_unit_3"] = true } , ["Value of Base_1_Flag when red"] = { ["Blue_unit_1"] = true , ["Blue_unit_2"] = true, ["Blue_unit_3"] = true } , ["Value of Base_2_Flag when red"] = { ["Blue_unit_1"] = true , ["Blue_unit_2"] = true, ["Blue_unit_3"] = true } , ["Value of Base_3_Flag when red"] = { ["Blue_unit_1"] = true , ["Blue_unit_2"] = true, ["Blue_unit_3"] = true } , } function Callback_Table.onGameEvent(eventName, playerID, slotID) if eventName == "change_slot" and slotID ~= nil and slotID ~= '' and playerID ~= nil then Slot_Unit_Name = DCS.getUnitProperty(slotID, DCS.UNIT_NAME) -- This returns the name of the unit in the selected slot local Base_1_Flag = tostring( net.dostring_in('server', " return trigger.misc.getUserFlag(\"Base 1 flag name\"); ") ) local Base_2_Flag = tostring( net.dostring_in('server', " return trigger.misc.getUserFlag(\"Base 2 flag name\"); ") ) local Base_3_Flag = tostring( net.dostring_in('server', " return trigger.misc.getUserFlag(\"Base 3 flag name\"); ") ) Block_Slot = false -- By default, the block marker is disabled if Block_List[Base_1_Flag][Slot_Unit_Name] ~= nil or Block_List[Base_2_Flag][Slot_Unit_Name] ~= nil or Block_List[Base_3_Flag][Slot_Unit_Name] ~= nil then Block_Slot = true -- Whatever the base and flag values are, if the selected slot unit name is found in the relevant subtable, the block marker for that slot will be enabled end local Player_List = net.get_player_list() for i, playerId in pairs( Player_List ) do local Player_Info = net.get_player_info( playerId ) if Player_Info.slot == slotID and playerID == playerId and Block_Slot then net.force_player_slot(playerId, 0, '') -- This forces the player attempting to enter the blocked slot back to spectators net.send_chat_to(Slot_Unit_Name.." DISABLED!", playerId) net.send_chat_to("CHOOSE ANOTHER SLOT!", playerId) end end end end DCS.setUserCallbacks(Callback_Table)
  16. For me, the key to avoiding VRS in the Mi-8 has been to drop to the deck first (so ground effect kicks in), before slowing down below 50km/h and attempting a hover (also, reset trim and use rudder and cyclic to keep the chopper stable). The Mi-8's descent is much easier to control if you have ground effect... since most of the authority is shifted back to the collective (same as when taking off), without funny business. The huey is more forgiving in this regard, you can get used to hovering at an altitude with it, which is bad if you're planning to switch back to the Mi-8... So don't get used to hovering at an altitude (regardless of the helicopter), kiss the ground first, slow down later.
  17. I'm guessing that mist.utils.get2DDist uses a similar method to what I posted above. You can always look for that function inside the MIST file and see what it does. MOOSE definitely uses almost the same method I posted above (since that's where I took the general idea from :D), but it only uses it for airbases and parking spots, not units (AFAIK). To answer your question, yes, Core - Coordinate is the place to go for this kind of stuff, specifically, you're looking for :Get2DDistance() or :Get3DDistance() As for practical MOOSE examples, here's a little script that I wrote to get the player's distance to a specific unit (the second function calculates and returns the distance):https://forums.eagle.ru/showpost.php?p=4111000&postcount=3 However, note that all these will only give you the distance between two coordinates, they won't tell you which object is closest to a specific coordinate... in order to get that, you'll need to use the script I posted in my first reply. Now, I don't know about MIST, but, like I said, MOOSE doesn't have any built-in method to calculate what you're asking for... it only has methods to find the closest airbase, parking spot and road point (AFAIK). Maybe I should talk to Pikey and Franky about this... we should be able to add this kind of functionality to MOOSE :thumbup:
  18. Thanks a lot guys! I also think it was time to take the torch from Sven, a lot of progress has been made over the last 2 years, the master branch stagnation was reaching epic proportions. Hope Sven is happy and doing well now... since he no longer has to deal with our never-ending questions, requests, suggestions and cluelessness :lol: I hope one day I'll be knowledgeable enough to contribute to MOOSE in a serious way, like you guys do... but I'm short on time, capacity and motivation these days :surrender:
  19. local Unit_Table = { "[color="red"]Unit_1[/color]" , "[color="red"]Unit_2[/color]", "[color="Red"]Unit_3[/color]" } [color="Blue"]-- Build a table with the chosen unit names [/color] local Reference_point = { x = [color="red"]x value[/color] , y = 0 , z = [color="red"]z value[/color] } [color="blue"]-- You can either define the reference coordinate like this or get the x and z values from another object using :getPoint().x and :getPoint().z (y isn't needed)[/color] local Distance_Table = {} for i, Unit_Name in ipairs( Unit_Table ) do if Unit.getByName(Unit_Name) and Unit.getByName(Unit_Name):isExist() then local Unit_Object = Unit.getByName(Unit_Name) local Unit_point = Unit_Object:getPoint() local Distance2D = math.floor( ( ( Reference_point.x - Unit_point.x ) ^ 2 + ( Reference_point.z - Unit_point.z ) ^ 2 ) ^ 0.5, 0 ) [color="blue"]-- Formula to calculate 2D coordinate distance + rounding[/color] table.insert(Distance_Table, Distance2D) end end local Threshold = 1000000000 [color="blue"]-- Define a large maximum distance threshold to compare to [/color] local Closest_Index = 0 for k = 1 , #Distance_Table do local asNum = Distance_Table[k] if ( asNum and asNum < Threshold ) then Threshold = asNum Closest_Index = k end end if Unit.getByName(Unit_Table[Closest_Index]) then local Closest_Object = Unit.getByName(Unit_Table[Closest_Index]) [color="blue"]-- This variable will cointain the unit object that's closest to the reference point (if any)[/color] local Closest_Name = Closest_Object:getName() [color="blue"]-- This variable will contain its name[/color] local Closest_Distance = Distance_Table[Closest_Index] [color="blue"]-- This variable will contain its distance from the reference point in meters[/color] trigger.action.outText("Closest unit = "..Closest_Name.."\nDistance (meters) = "..Closest_Distance, 10) [color="blue"]-- You can then include the info in a text message, if you want to[/color] end Alternatively, you can save yourself some pain and use MOOSE or MIST functions which already do this stuff for you ;)
  20. That's a question for Grimes ;) I only know what works (or doesn't) based on trial and error, not intimate knowledge of the workings of the DCS scripting engine. Also, the functions I schedule most of the time are too long to "compress" in a single scheduler line, so writing a separate function above the scheduler is always the best option for me (I'm a big fan of code readabililty).
  21. local function Explosion(Ped1Pos) local Expl_vec3 = { x = Ped1Pos.x , y = 0 , z = Ped1Pos.z } trigger.action.explosion(Expl_vec3 , 100) end function Ped1() if trigger.misc.getUserFlag("311") == 1 and Unit.getByName('ROT PEDRO 1') then local Pedro1 = Unit.getByName('ROT PEDRO 1') local Ped1Pos = Pedro1:getPosition().p timer.scheduleFunction( Explosion, Ped1Pos , timer.getTime() + 10 ) trigger.action.setUserFlag( "301", false ) end end
  22. This is all standard DCS code, you don't need MIST to run it. Anyway, looks like the error is happening in line 5053 of the temporary lua file located in C:\Users\Arnaud\AppData\Local\Temp\DCS.openbeta\/~mis000036D0.lua (Note that DCS creates these temporary files when you run scripted missions, but keep in mind that they're removed eventually) There's a chance this temporary lua file is a copy of mist_4_3_74.lua... if this is the case, then I guess that the problematic line is the following: if [color="Red"]messageData.displayedFor[/color] > messageData.displayTime then [color="Blue"]-- If [i][b]messageData.displayedFor[/b][/i] returns nil, this statement will raise the kind of error that you got[/color] This error seems to be related to text messages, which brings me to something I've seen in your snippet: [color="Red"]affiche[/color]("Checking Transit",1) [color="Red"]affiche[/color]("Flag 1 "..flag1,5) [color="red"]affiche[/color]("Flag 5 "..flag5,5) [color="red"]affiche[/color]("Transit initié",5) [color="Blue"]-- Looks like you're trying to create text messages using a variable / function named [i][b]affiche[/b][/i], which isn't defined in your snippet[/color] [color="Blue"]-- Is affiche defined somewhere else, like this?[/color] function affiche(text, time) trigger.action.outText(text , time) end Here, try this snippet instead, see if you still get that error (MIST isn't needed):
  23. Any new Russian module will be just as handicapped without proper DL implementation and improved R77. Also, I think that developing Chinese modules which don't have the ability to equip the PL12 (SD10) would be a mistake.
  24. SD10 is less affected by drag than the AIM120, it can reach higher speeds and maintain them for longer. It also has similar turning ability and countermeasure resistance, so I really don't know why some people keep playing down its obvious qualities. Can it be defeated? Of course it can, like the rest of missiles in DCS How hard to defeat is it? This is partially subjective, ofc, but it's harder to defeat than the AIM120 in my experience (high sustained speeds + good energy conservation overall). As things stand, SD10 is the second best fox3 in DCS, after the phoenix. Phoenix > SD10 SD10 > AIM120 AIM120 > R77 Don't take my word for it, just remember how ED buffed the AIM120 soon after the JF17 release... coincidence? :no_sad: Also: Feel free to create your own test missions and analyze the data, as others have already done.
×
×
  • Create New...