-
Posts
388 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by C6_Hellfrog
-
does anyone know if a lua script usually working from inside a miz file driven by the trigger event : do file script, can work outside of mission ? my idea is to use trigger.action.outsound... in lua script in export.lua by example without having to use an external program to sound ... may it work or these functions are only editor and missions relative ?
-
newbie in scripting : help please with group ID
C6_Hellfrog replied to C6_Hellfrog's topic in Mission Editor
OK, thanks for the advice, i realize I misunderstood and confused defered call and repetitive call... but any way with continous single call from trigger event it should work... and is not... with repetitive call once, it should work ... and is not... something with the code or a bug ? -
newbie in scripting : help please with group ID
C6_Hellfrog replied to C6_Hellfrog's topic in Mission Editor
adding a trigger.action.outText at the start of CheckAlt function i see it is run only once and not timly repeated. why ? if i change the event trigger where i call test_alt() to continuously and not once, I have again nil value error in the call... EDIT : Ok, the call has to be continous, and after a delay of 7 sec to have time maybe for script to be interpreted. But still no sound neither outtext whatever is the altitude.... running without compiling error, but not working as intended... any idea ? -
I think it refers to the scripts listed in the down part of this page http://wiki.hoggit.us/view/Simulator_Scripting_Engine_Documentation and maybe have a look here if good knowledge about lua http://wiki.hoggit.us/view/IADScript_Documentation
-
don't have that alt pb on nevada , but I have it on caucasus map in 202 one remark working on 202 with caucasus map, with 1.1 version of Starway, and trying to mix with Barthek one's, if I keep Barthek trees and Barthek's low altitude textures (not mountains where I keep Starway's), no pb with trees. If I use Starway's trees on Barthek's ground, I do have the pb of flying trees on some locations
-
newbie in scripting : help please with group ID
C6_Hellfrog replied to C6_Hellfrog's topic in Mission Editor
ok script seems to run fine, but no sound EDIT : in fact no : if i add trigger.action.outText("10", 700) if test is true, i have no display I have the sound files in miz l10n/DEFAULT/ I play them once after loading script in the same event trigger my script call for sound is trigger.action.outSoundForGroup(myGroupID, 'l10n/DEFAULT/3-end.wav') what is wrong ? test_Alt = function() env.setErrorMessageBoxEnabled(true) timer_frequency = 1 myGroupName = "GroupHellfrog" myPilot = "Hellfrog" myGroup = Group.getByName(myGroupName) MyGroupID = Group.getID(myGroup) myUnit = myGroup:getUnit(1) if myUnit == nil then trigger.action.outText("nil unit", 900) end timer.scheduleFunction(CheckAltitude, myUnit, timer.getTime() + timer_frequency) end function CheckAltitude(myUnit, time) -- use the scheduleFunction's second argument local myPos = nil myPos = myUnit:getPosition() if myPos == nil then trigger.action.outText("nil pos", 900) end myALT_m_AGL = unit_Alt_meters_AGL(myPos) if myALT ~= nil then if myALT >= 1 then if myALT < 2 then trigger.action.outText("ONE", 700) trigger.action.outSoundForGroup(myGroupID, 'l10n/DEFAULT/1-end.wav') end end if myALT >= 3 then if myALT < 4 then trigger.action.outText("3", 700) trigger.action.outSoundForGroup(myGroupID, 'l10n/DEFAULT/3-end.wav') end end if myALT >= 5 then if myALT < 6 then trigger.action.outText("5", 700) trigger.action.outSoundForGroup(myGroupID, 'l10n/DEFAULT/5-end.wav') end end if myALT >= 10 then if myALT < 11 then trigger.action.outText("10", 700) trigger.action.outSoundForGroup(myGroupID, 'l10n/DEFAULT/10-end.wav') end end if myALT >= 15 then if myALT < 16 then trigger.action.outText("15", 700) trigger.action.outSoundForGroup(myGroupID, 'l10n/DEFAULT/15-end.wav') end end if myALT >= 20 then if myALT < 21 then trigger.action.outText("20", 700) trigger.action.outSoundForGroup(myGroupID, 'l10n/DEFAULT/20-end.wav') end end return time + timer_frequency else -- looping return nil end end function unit_Alt_meters_AGL(uPos) local uAGL = nil local GndAlt = nil if uPos ~= nil then GndAlt = land.getHeight({x = uPos.p.x, y = uPos.p.z}) -- gnd alt below unit uAGL = uPos.p.y - GndAlt -- unit feet alt above gnd uAGL = uAGL*0.3048 -- convert feet to m end return uAGL end -
invincibility on lOl (sorry BaD, was just to joke)
-
newbie in scripting : help please with group ID
C6_Hellfrog replied to C6_Hellfrog's topic in Mission Editor
ah shit... i'm sick with a sort of flue and my brain is not working as it should... should have noticed myself. sorry for asking so simple thing. But thanks anyway. will try if working... asap -
newbie in scripting : help please with group ID
C6_Hellfrog replied to C6_Hellfrog's topic in Mission Editor
Hi again Still having some problems with the scripts I just want to have a scheduled check about my unit altitude above ground level to voice announcements to emulate a virtual copilot to help for training at low altitude here is what I have added in the mission editor 1st event : 2d event : here is the script : test_Alt = function() env.setErrorMessageBoxEnabled(true) timer_frequency = 1 myGroupName = "GroupHellfrog" myPilot = "Hellfrog" myGroup = Group.getByName(myGroupName) MyGroupID = Group.getID(myGroup) myUnit = myGroup:getUnit(1) if myUnit == nil then trigger.action.outText("nil unit", 900) end timer.scheduleFunction(CheckAltitude, myUnit, timer.getTime() + timer_frequency) end function CheckAltitude(myUnit, time) -- use the scheduleFunction's second argument local myPos = nil myPos = myUnit:getPosition() if myPos == nil then trigger.action.outText("nil pos", 900) end myALT_m_AGL = unit_Alt_meters_AGL(myPos) if myALT ~= nil then if myALT >= 1 then if myALT < 2 then trigger.action.outSoundForGroup(myGroupID, '1-end.wav') end end if myALT >= 3 then if myALT < 4 then trigger.action.outSoundForGroup(myGroupID, '3-end.wav') end end if myALT >= 5 then if myALT < 6 then trigger.action.outSoundForGroup(myGroupID, '5-end.wav') end end if myALT >= 10 then if myALT < 11 then trigger.action.outSoundForGroup(myGroupID, '10-end.wav') end end if myALT >= 15 then if myALT < 16 then trigger.action.outSoundForGroup(myGroupID, '15-end.wav') end end if myALT >= 20 then if myALT < 21 then trigger.action.outSoundForGroup(myGroupID, '20-end.wav') end end return time + timer_frequency else -- looping return nil end end function unit_Alt_meters_AGL(uPos) local uAGL = nil local GndAlt = nil if uPos ~= nil then GndAlt = land.getHeight({x = uPos.p.x, y = uPos.p.z}) -- gnd alt below unit uAGL = uPos.p.y - GndAlt -- unit feet alt above gnd uAGL = uAGL*0.3048 -- convert feet to m end end return uAGL end what I get is an error about a " <EOF> missing after 'end' " .... ????? I have no idea about what is the cause and how to correct. -
newbie in scripting : help please with group ID
C6_Hellfrog replied to C6_Hellfrog's topic in Mission Editor
ouch, didn't thought it was so case sensitive. and difficult to see. many thanks. except that my code was ok ? -
hello I'm making first attempts to use scripting function in ME. I just need to have the group ID of the player aircraft it is (to stay more simple) solo mission no MP I made a event 'one time' ,rule is 'time more than > 5', action 'run script' with that code (no typo errors) env.setErrorMessageBoxEnabled(true) myGroupName = "GroupHellfrog" myPilot = "Hellfrog" myGroup = Group.getByName(myGroupName) myGroupID = Group.GetID(myGroup) I need only the unit name and its group ID for after. but that is already a problem I get an error message : Attempt to call field 'GetID' a nil value I suppose I have myGroup == nil but I don't know why... maybe the syntax is not the good one ? can someone help please ?
-
time to take take some time within mission editor... as you begin with very simple ones is not so complicated, then go further, step by step...
-
I do have 2 radeon r980 xfire + 3 x1980x1020 = 5760x1080 with ALt Enter is OK in 202 but no export working unless you stay windowed and then no xfire and bad fps no way in 153 for xfire but export working and windowed ok fps inferior greatly than in 202, have to reduce graphics options or reduce resolution therefore have to make a choice between exports, fps, xfire and version you use...
-
there iss still some work to do on that , because all the wav files from \DCS\Sounds\Speech\Sound\RUS\Mi-8MT\Messages have to be translated and should go in \DCS\Sounds\Speech\Sound\ENG\Mi-8MT\Messages probably it is on BST roadmap todo list... if someone is motivated and talented enough and has the hardare and software to do that, a mod could be done awaiting for that but second point, before to do all that, have to check that it will work with some sample... above my capalities anyway... but that's the "how to" general lines...
-
trying to mod for that Vertical Cam , I started from HU1H files. Mods/aircraft/UH1 or Mi8.../cockpit/scripts/Devices_specs/Cargo_cam.lua Mods/aircraft/UH1 or Mi8.../cockpit/scripts/CARGO_CAM/CARGO_CAM_init.lua Mods/aircraft/UH1 or Mi8.../cockpit/scripts/CARGO_CAM/CARGO_CAM_base_page.lua, Mods/aircraft/UH1 or Mi8.../cockpit/scripts/device_init.lua in that last one you have lines 369 creators[devices.CARGO_CAM] = {"Mi8::avCargo_Camera", LockOn_Options.script_path.."Devices_specs/Cargo_Cam.lua", {}, -- inUH1 you have {{"RADAR_ALTIMETER",devices.RADAR_ALTIMETER}}, "" } and 430 creators[devices.EXTERNAL_CARGO_SPEECH] = { "Mi8::avExternalCargoSpeech_Mi8", "", {{"HeadWrapper",devices.HEAD_WRAPPER}} } I can have a window on screen, can move it location,as on the Hu1H, but it stays black without anything inside it. seems strange, should work... anyone else trying on that ?
-
Try HD mods for Ka50 pit, it increases greatly readability. But you're true. Except you have not to forget that computers power, specificaly on video ram, has increased significantly since first BS... more HD textures means more VRAM and calculations. It is true anyway SA342 has a great impact on FPS and hope it could be better.
-
passed some times on searching forums aboutthat, but didn't found a success way to achieve that : Editor doesn't allow to have a load on ships. Is there a way to bypass that and how to ? Is there a way and how to use a slingable model and change its aspect to suit an other one ? exg : use jeep slingable model from Ranger's mod and have a raft that is slingable or a soldier ? objective is for navy recue mission ... thanks in advance to people who already suceeded in those points.
-
tried it in 202. crash on start. edited miz : 2d chopper on same location than player chopper. Erased 2d chopper and working ok. But I don't understand why, I was unable to move a bit the second chopper, that's why I erased it.
-
hi all, I'm not an expert in scripting with the editor, so sorry if stupid questions or misunderstanding some pieces of code... but I am not totally newbie at programming stuffs, and trying to understand how to adapt to DCS 1.5 or 2 Spinter's mission. therefore I finally searched the forum a lot and found some things. first, it seems that the static object destroy() function is no more working and buggy in the editor script, true ? consequence : Is there not any other option than destroying the statics objects ? And finally I stil have one first question, why is it absolutely necessary to destruct the objects in Spinter miz ? to avoid too many instances of hooked objects visible and duplicates ? (we can do with that if messaging system is working, waiting for better soluce)... I suppose it ain't only to check mission is complete (in that case, a simple new flag could do the job) neither to count loads remaining... I suppose there's something else I still didn't understood ? therefore I would be pleased to have it explained in that case... eg : I don't understand the need of destroy() in the first lines of creacargo function... EDIT : found the answer in FlightControl thread below : about bugs anyway in editor, have to recreate cargo every new cargo.... second : I found this other thread : http://forums.eagle.ru/showthread.php?p=2690289#post2690289 in which they speak about using MIST.... Can't we create/use moving objects (like a jeep to transport, with no move on ground) from the static ones, and avoid use of static objects, only changing mass pos and so on as in local static{} table in creacargo to avoid the problem and proceed like explained in that thread ? third : reading and trying to understand how to use MIST, I have an idea I can't test because of my lack of mastering lua very efficiently and quickly to test it efficiently. But maybe someone can try or comment, that's why I am posting. Can't we try to proceed the whole table containing the static object we want to delete, having a deepcopy (MIST funciton) of it, then erasing or updating to nil the content we want to delete, then deepcopy again the edited table back in the static objects one ? (maybe sorting problems ?), or it may crash the game ? I have doubts because of commented lines in GoWriteDrop function... is it no way ? I'm only trying to understand and help finding a soluce, my objective remaining the use of sounds orders for hovering help from copilot or soldier on ground via radio trans in other missions I'd like to develop. finally found a lot of problems coming from buggy editor system not working as it should for cargos.... EDIT : that one too is interesting... http://forums.eagle.ru/showpost.php?p=2782350&postcount=7 Script is too buggy to have it working OK ? only one real cargo at a time ? that's the reason for the destroy ? But If you do a clean miz with nothing in it else than statics to sling, it is working as it should... (I 'm mainly on 2 alpha version). EDIT2 : well, MOOSE http://flightcontrol-master.github.io/MOOSE/ seems promising, check the moose/cargo.lua in moose install folder for a way to counteract lack of destroy() function... Edit 3 : the mission helicopter war (on DCS site/user file) seems to work good on 2 alpha with helo script and mist, with vocal announcements and cargo load unload.
-
searching how to add copilot hover orders in missions, i was just reading scripts tools evolution since 1.27, and there are a lot of things I need to learn and understand. therefore, relative to your question, I suggest you may build missions using infos from MIST http://forums.eagle.ru/showthread.php?t=98616 librabry,eg LOS function, unit in zone function and so on... will have much precise pos calculation capabilities and your datas will be in tables, ready for use in scripts then up to you to write a radiocommand menu using these but need a good level in mission lua scripting that question should be in mission/script thread for experts readings and suggests
-
Ranger79 Base Objects Pack (Hesco's + others)
C6_Hellfrog replied to Ranger79's topic in Static/AI Mods for DCS World
I confirm same pb as skullleader, same configuration, well found for the cause skull ! -
Capt Zeen UH-1H Helios profile ! !
C6_Hellfrog replied to Capt Zeen's topic in PC Hardware and Related Software
One possibility could be relative I suppose to the fact last editor creates a *.layout" file that is missing when you edit screen config Found No soluce else than manual editing of hpf files in notepad++... really harrassing work... but that way you can organize and compare items moreover, it is a problem to adapt quickly a 3 monitor config (3x1920x1080) to an eyefinity (5760x1080) config by example... any news about the dvpt of a new gui tool ? -
Hi , 1 st : I'd like for reasons to be able to play a wav or ogg or whatever while in lua script called by export.lua, and not in a specific to a miz mission script. Is it possible ? how to ? what function to call ? tried with os.execute but opens the os shell and very high fps impact. 2d : If possible, is there a way to use, and how to, the text to speech metatables (look at .\sounds folder and below) from the mission editor. So to say, may we call in any way text to speech functions from the triggering system of mission editor from outside a mission ? 3rd : same question as 2d, but from within a mission script lua.
-
2nd keyboard with custom key mappings?
C6_Hellfrog replied to steve2112's topic in PC Hardware and Related Software
the utility is limited to manage only two different kbds at the same time, no more.