Page MenuHomeFeedback Tracker

Trigger optimization: triggers check condition and build thisList even if condition has been fulfilled
New, NormalPublic

Description

The condition loop of a trigger seems to keep running even when a non-repeatable trigger has already been activated (i.e. condition is already true). This appears unnecessary and wasteful - why check for the truth of a condition that is already true, if you only need to check once?

Additionally, according to @dedmen from #feedback_tracker on the Arma 3 Discord server, it also builds thisList after the trigger has been triggered:

Dedmen - 06/24/2017
SuicideKing Can confirm that. It first checks the condition and after it has the result it checks if the Trigger can even be triggered.
Not only that but it also prepares the list of vehicles in side the trigger every time. Even though it can never trigger.
So.. Onto the Feedback tracker with that

This could be a major issue for large trigger areas, or a lot of triggers in missions. Looks like a major optimisation opportunity to me.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
10.0.14393
Category
Engine
Steps To Reproduce

Get the condition loop to print messages. For example, put:
systemChat str (thisList); true in the condition field of a trigger.

Simple repro scenario:

Walk into the trigger area (marked by Czech hedgehogs) and note system chat messages.

Additional Information

i don't know the engine details
but i would assume that the loop's condition should be made while (!conditionMet || isRepeatable) {check the trigger condition}

May be a good idea to have an option to auto-delete non-repeatable triggers after they're activated.

Event Timeline

sh4dow added a subscriber: sh4dow.Jul 1 2017, 1:30 PM