target_practice 163 Posted November 23, 2016 Is there a way to make a trigger repeat regularly by itself? I need a trigger that detects objects within it via thislist to occasionally update the list it creates (which is used by another script). However it needs to be able to repeat without all objects having to leave its zone first. Share this post Link to post Share on other sites
ProfTournesol 956 Posted November 23, 2016 Thislist is constantly updated, if the the trigger is set to repeatable. 1 Share this post Link to post Share on other sites
target_practice 163 Posted November 24, 2016 The trigger assigns the contents of thisList to a variable (which aforementioned script references) within its On Activation field. Will that be updated too? Share this post Link to post Share on other sites
killzone_kid 1333 Posted November 24, 2016 What is wrong with reading content of the thisList of the trigger with list (https://community.bistudio.com/wiki/list) command at any time? unitsInThisList = list tr1; Share this post Link to post Share on other sites
target_practice 163 Posted November 24, 2016 Because the variable specifically contains land vehicles only: https://forums.bistudio.com/topic/198143-addvehicle-from-list/ Share this post Link to post Share on other sites
f2k sel 164 Posted November 24, 2016 repeats every one second this && round (time %1) ==1 repeats every 5 secs ect. this && round (time %5) ==5 The trigger still needs to be set to repeatable. 3 Share this post Link to post Share on other sites
target_practice 163 Posted November 24, 2016 Small question, what does the '%' operator actually do/mean? I haven't been able to find anything on it on the BIKI for some reason. Share this post Link to post Share on other sites
f2k sel 164 Posted November 24, 2016 Small question, what does the '%' operator actually do/mean? I haven't been able to find anything on it on the BIKI for some reason. https://community.bistudio.com/wiki/a_%25_b Divide or Mod according to the above, after reading it it may also work without the round command but I haven't checked. Share this post Link to post Share on other sites
target_practice 163 Posted November 24, 2016 Since I'm using this on a multiplayer mission, I'd assume it would be a good idea to use serverTime to avoid desync. EDIT: Also for clarity, I should add that the purpose of me refreshing the listing is in the hope that, coupled with the other script occasionally looping, it will cause AI to re-use vehicles that have been destroyed and respawned; something which they otherwise seem unable to do. Share this post Link to post Share on other sites
Sertica 18 Posted February 3, 2020 On 11/24/2016 at 7:41 AM, f2k sel said: repeats every one second this && round (time %1) ==1 repeats every 5 secs ect. this && round (time %5) ==5 The trigger still needs to be set to repeatable. I'm looking for a solution and this does not work. The trigger does not execute even once. Share this post Link to post Share on other sites
pierremgi 4927 Posted February 3, 2020 1 hour ago, Sertica said: I'm looking for a solution and this does not work. The trigger does not execute even once. You're hacking an old post. If you need help despite your effort to find a solution, just write a new topic with a clear need. There are plenty of ways to run a script regularly. But some of them will be more accurate for your aim (if you can tell about it). Share this post Link to post Share on other sites
Sertica 18 Posted February 3, 2020 6 hours ago, pierremgi said: You're hacking an old post. If you need help despite your effort to find a solution, just write a new topic with a clear need. There are plenty of ways to run a script regularly. But some of them will be more accurate for your aim (if you can tell about it). I'm using hints to display data while I play test sequences in the editor. The text needs to update every x seconds. Share this post Link to post Share on other sites
f2k sel 164 Posted February 3, 2020 if you remove this && from the command it should work in your case Share this post Link to post Share on other sites
Sertica 18 Posted February 3, 2020 5 hours ago, f2k sel said: if you remove this && from the command it should work in your case That is what I did. But I found the problem. It was set to use timeout. Share this post Link to post Share on other sites