Facocero Posted February 16, 2022 Posted February 16, 2022 Hi everyone, I started planning a small mission with two helicopters to play in multiplayer me and a friend of mine. Almost everything works if it weren't for a flag problem. So I inserted a simple script to evaluate the status of the flag for the duration of the flight. trigger.action.outText (trigger.misc.getUserFlag ('90 ') ..' This is the value of Flag 90 ', 10, true). There are several problems here. 1. if I insert repetitive action, it is updated but all the other messages that appear during the flight are hidden almost immediately. 2. if I use false instead of true, then the message loops endlessly. any advice on how to act ??
Rudel_chw Posted February 16, 2022 Posted February 16, 2022 You dont need a Repetitive trigger, you can use a switched condition trigger, that detects only when the Flag 90 is changed, it looks like this: The last three triggers are there just to test that the switched condition works. test.miz For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
Facocero Posted February 16, 2022 Author Posted February 16, 2022 Thanks for the help Rudel it works, but not for the use I have to make of it. Basically the flag has a value of 0 or 1, and when it is 0 it is not displayed.
dark_wood Posted February 17, 2022 Posted February 17, 2022 (edited) You need to reset the flag in ACTIONS tab: MISSION START > no condition > Flag 90 set value = 1 SWITCHED CONDITION > time since FLAG 90 - 60 seconds > DO SCRIPT + FLAG 90 set false (reset it) + FLAG 90 set value = 1 (start again) So, when mission starts, you initialize the flag, then after each 60 seconds it will be evaluated: show text, reset flag, trigger flag again - time since flag - repeat all process every minute Hope it helps you. Edited February 17, 2022 by dark_wood 1
Facocero Posted February 17, 2022 Author Posted February 17, 2022 Thanks dark_wood for your suggestion 1
Recommended Posts