Page MenuHomeFeedback Tracker

"triggerAttachObject" is broken
New, WishlistPublic

Description

What does this command do? It suppose to make trigger watch static object with known ID. For example to watch a building and detect when it was destroyed. If this is set in the editor and trigger is grouped with static object its activation is changed to "STATIC" and it works as intended. If this is done via script, activation is also chnges to "STATIC" however trigger fails to detect the object it was attached to completely.

Details

Legacy ID
3426448774
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Run this on stratis

mybuilding = [0,0,0] nearestObject 67666;
tr1 = createTrigger ["EmptyDetector", position mybuilding];
tr1 setTriggerArea [100,100,0,true];
tr1 triggerAttachObject 67666;
tr1 setTriggerStatements ["hintsilent str [this, typeOf mybuilding, triggerActivation tr1]; this","",""];

This will add 100 x 100 trigger to a military cargo post and should make it watch this object, yet 'this' returns false when detecting obviously "PRESENT" building.

Event Timeline

Killzone_Kid edited Additional Information. (Show Details)
Killzone_Kid set Category to Scripting.
Killzone_Kid set Reproducibility to Always.
Killzone_Kid set Severity to None.
Killzone_Kid set Resolution to Open.
Killzone_Kid set Legacy ID to 3426448774.May 7 2016, 5:17 PM

Can confirm this.

triggerAttachObject can group a trigger with a static building but it will never return true by checking the trigger statement, even the trigger's area covers the grouped building.

And what's more, unlike "triggerAttachedVehicle" which can check back the grouped vehicle, there's no command alone with "triggerAttachObject" to check the grouped object ID back.

So new command "triggerAttachedObject" is also needed.