dooom Posted December 4, 2016 Posted December 4, 2016 can someone help me out with some lua code to print a flag value? All i need is code to print a score like "RED 3: BLUE 4" if flag 1=3 and flag 2=4 as an example. ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL
Chump Posted December 4, 2016 Posted December 4, 2016 (edited) local redFlagValue = trigger.misc.getUserFlag("1") local blueFlagValue = trigger.misc.getUserFlag("2") local msg = string.format("RED: %i BLUE: %i", redFlagValue, blueFlagValue) trigger.action.outText(msg, 10)This will display the message for ten seconds to all players. Edited December 4, 2016 by Chump 2
dooom Posted December 4, 2016 Author Posted December 4, 2016 Top notch man thanks! ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL
AKA_Clutter Posted August 9, 2021 Posted August 9, 2021 Any idea if this still works. I tried something similar and got an error. Haven't' a clue if I made the error, or if things have changed. ---------------- AKA_Clutter Win 10 Pro, Intel i7 12700k @4.6 GHz, EVGA RTX 3080 FTW, Ultra 64 GB G.Skill DDR4 3600 RAM, Acer 27" flat screen, HP Reverb G2, TM Warthog HOTAS with Virpil warBRD base, MFG Rudder Pedals, Virpil TCS Rotor Base with AH-64Dcollective, TrackIR 5 Pro w/Vector Expansion, PointCTRL.
toutenglisse Posted August 10, 2021 Posted August 10, 2021 18 hours ago, AKA_Clutter said: Any idea if this still works. I tried something similar and got an error. Haven't' a clue if I made the error, or if things have changed. Sentence is correct. You can also write it like this : Spoiler local redFlagValue = trigger.misc.getUserFlag("1") local blueFlagValue = trigger.misc.getUserFlag("2") trigger.action.outText('RED : ' .. redFlagValue .. ' BLUE : ' .. blueFlagValue, 10)
Recommended Posts