I created a log to log the unit when it dies. But, when a viper abduct another unit, it trigger it ! Why?
It's a problem because also I have a trigger when the player enters a region, but the trigger is triggered when a viper of the player abduct (even a non-player unit) in the region. How to solve it?
I think this happens because of how the ability is built.
I suppose it does something like :
- This ability create a placeholder (or commonly called "dummy") unit, usually a precursor (see flags of Effect of type "Create Unit"), to hook the initial target unit and position.
- Then it does the intended effect.
- Finally, it removes the dummy unit by killing it. A unit dies and so the trigger detects the event.
To check in TRIGGERS if the triggering unit is a precursor :
- (Data Editor) Create a Validator "Unit State" and set the field "State" to "Precursor". Set the field "Enabled" to "Enabled".
- (Trigger Editor) (See attached picture) Create a trigger with a condition : "Validator Execute" (in category "Environment"). You won't find the validator (because Blizzard didn't fix this function, pretty recent in the SC2 timeline) and you have to "Convert String to Game Link" and to write the validator ID.
If this doesn't work, check what dies from this ability and exclude it in your conditions. EXCEPT the dying unit CANNOT BE the targeted unit of the ability else it would be a non-sense. That'd mean : Dead-end.
Have a nice day.
ATTACHMENTS
SC2_Trigger_IsPrecursor
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello,
I created a log to log the unit when it dies. But, when a viper abduct another unit, it trigger it ! Why?
It's a problem because also I have a trigger when the player enters a region, but the trigger is triggered when a viper of the player abduct (even a non-player unit) in the region. How to solve it?
Thank you
Hello,
I think this happens because of how the ability is built.
I suppose it does something like :
- This ability create a placeholder (or commonly called "dummy") unit, usually a precursor (see flags of Effect of type "Create Unit"), to hook the initial target unit and position.
- Then it does the intended effect.
- Finally, it removes the dummy unit by killing it. A unit dies and so the trigger detects the event.
To check in TRIGGERS if the triggering unit is a precursor :
- (Data Editor) Create a Validator "Unit State" and set the field "State" to "Precursor". Set the field "Enabled" to "Enabled".
- (Trigger Editor) (See attached picture) Create a trigger with a condition : "Validator Execute" (in category "Environment"). You won't find the validator (because Blizzard didn't fix this function, pretty recent in the SC2 timeline) and you have to "Convert String to Game Link" and to write the validator ID.
If this doesn't work, check what dies from this ability and exclude it in your conditions. EXCEPT the dying unit CANNOT BE the targeted unit of the ability else it would be a non-sense. That'd mean : Dead-end.
Have a nice day.