xjiks Posted April 8, 2011 Posted April 8, 2011 Hi, I was trying to define a condition for a flight group to end orbiting at a waypoint, but I don't know how the lua code should be written in the "condition" panel. From the GUI manual: Command A Command is an instantaneous group action that is executed immediately upon activation. For example, a Set Frequency command action will change the group's radio communications frequency. Like Tasks and Enroute Tasks, the conditions for executing Commands can be customized by the mission designer and include mission time, flags state, command activation probability, and custom scripting in LUA code language. I tried to write: flag1 == true But unfortunately, when the fly group reach the waypoint the game crashes, and in the dcs.log it says my command is wrong. Can anyone point me the Variable names available and syntax (quotes, coma, semicolon, etc.) I must use in order to write a condition based on the status of a flag ? Thanks in advance, Xjiks L'important n'est pas de tuer, mais de survivre. [sIGPIC][/sIGPIC] if you read this you are too curious
Amarok_73 Posted August 16, 2011 Posted August 16, 2011 BUMP Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
51thPolux Posted August 16, 2011 Posted August 16, 2011 trigger.setUserFlag(1, true) http://forums.eagle.ru/showpost.php?p=1162455&postcount=7
Speed Posted August 16, 2011 Posted August 16, 2011 (edited) trigger.setUserFlag(1, true) http://forums.eagle.ru/showpost.php?p=1162455&postcount=7 Not functional as of 1.1.0.9. Lua in waypoint actions and triggered actions effectively useless in this patch. Let's hope next patch this changes... BTW, if the game is crashing, then that's a bad thing. The game shouldn't crash with a Lua syntax error, as "flag1 == true" certainly is a Lua syntax error. It's supposed to do something like, assert(loadstring(<string>))() so that the game never crashes due to Lua errors. I finally ordered http://www.amazon.com/gp/product/8590379825/ myself, though, this entire book is available online- legally, and for free- nothing beats a hard copy in your hands. Edited August 16, 2011 by Speed Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc.
Amarok_73 Posted August 16, 2011 Posted August 16, 2011 Ever heard of Wiki?? Working hard, eh? Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
Recommended Posts