Nate--IRL-- Posted September 26, 2010 Posted September 26, 2010 (edited) Is there a possibility for Sub-second triggering of flags? I have tried to edit the mission file to set a flag after say, 0.1 second, but it still takes a second for the flag to trigger (an explosion in this case). Sub-second processing would allow for the possibility of simulating stuff like ripple release bomb explosions, realistic looking flak etc. But it feels like all the triggers are evaluated at a one second tick rate, does any body know for sure? Edit:- Meant to post this in the DCS section....... Nate Edited September 26, 2010 by Nate--IRL-- Ka-50 AutoPilot/stabilisation system description and operation by IvanK- Essential Reading
Grimes Posted September 27, 2010 Posted September 27, 2010 humm, good question. I think it might be hardcoded to an extent. I suppose you could try to modify the delay time in the mission file itself. Change "1.0" to "0.5" for instance on a "time since" condition. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Nate--IRL-- Posted September 27, 2010 Author Posted September 27, 2010 Yeah that was my first thing to try, all I succeeded in doing was getting the trigger to actually process at one second intervals rather than the ~2 seconds the "Time Since Flag =1" normally produces. Even set at 0.1 the interval is 1 second. Even then if the Mission is saved for any reason all the value gets reset to 1 :( I'd say it hard coded unfortunately. Nate Ka-50 AutoPilot/stabilisation system description and operation by IvanK- Essential Reading
Case Posted September 27, 2010 Posted September 27, 2010 Sub-second processing would allow for the possibility of simulating stuff like ripple release bomb explosions, realistic looking flak etc. But it feels like all the triggers are evaluated at a one second tick rate, does any body know for sure?My gut feeling says it's hardcoded at a 1Hz cycle, and probably for a reason. However, if you want to simulate ripple release bomb explosions you may be able to use landmines (under static objects). If you place them close enough to eachother you could trigger the explosion of the first, and then that explosion will trigger the others. I've tried this once and it didn't work, but you might have to place them closer to eachother. There are only 10 types of people in the world: Those who understand binary, and those who don't.
nomdeplume Posted September 27, 2010 Posted September 27, 2010 I think the only way would be to put the delay into the trigger actions themselves, but it doesn't seem that Lua has a built-in sleep function. You could try busy-waiting, but that's not going to be portable and might cause performance problems (probably not an issue if it only executes for a short time, though). e.g. modify the actions to include for i = 1, 50000000 do end between the actions. Might work. But then again, it might not. (I picked that number because it results in a visible delay when run on my fileserver, a Xeon 3440 @ 2.53 GHz. Takes about a third of a second to run.)
Nate--IRL-- Posted September 27, 2010 Author Posted September 27, 2010 Thanks, I've tried it and it does produce a delay, but unfortunately it pauses everything in the sim including graphics output. Oh well, was worth a try, thanks. Nate Ka-50 AutoPilot/stabilisation system description and operation by IvanK- Essential Reading
Recommended Posts