I have created a Hero unit, with the Unit Flag Heroic, and the unit of type Hero. I'm trying to detect when a hero unit comes within range of an NPC, so I have:
Did you try to remove the condition and see if the trigger works without it? From how it looks, the condition should work.
Is NPC a unit variable? Events which require specific units will not work with dynamic variables.
Actually the NPC part is hard coded until I get it working. I changed it to keep it more simple. I figured it belongs in the data forum because it is potentially a data problem and not actually a problem of the trigger. Yes without the condition it works fine, or by using the different filter I described above which is not ideal.
Ok it was my own data mistake. In addition to Unit Flag - Hero and Object Type - Hero I had to set Unit Attribute - Heroic
My god. How many ways do I have to tell it it's a damn hero!!!
Unit Flag: Hero makes the unit have a shortcut portrait on the right side of the screen. The user will also have a quick hotkey to select that hero.
Object Type: Hero is used by the editor to organise things. It places it in the Hero folder on the list.
Unit Attribute: Heroic is just an other attribute like Armored, Light, Biological, etc. Like this you can have effects that deal +damage to Heroic units, for example.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have created a Hero unit, with the Unit Flag Heroic, and the unit of type Hero. I'm trying to detect when a hero unit comes within range of an NPC, so I have:
When I move my hero unit within range of the NPC, it is not performing the actions!
Anyone have some ideas? It works fine when I remove the filter condition or when I set the filter to just be Excluded: Missile, Hidden, Dead, Item
edited trigger code for clarity
This actually belongs into the trigger forum.
Did you try to remove the condition and see if the trigger works without it? From how it looks, the condition should work.
Is NPC a unit variable? Events which require specific units will not work with dynamic variables.
Actually the NPC part is hard coded until I get it working. I changed it to keep it more simple. I figured it belongs in the data forum because it is potentially a data problem and not actually a problem of the trigger. Yes without the condition it works fine, or by using the different filter I described above which is not ideal.
Heroic apparently refers to the unit's armor type.
Instead, use the following condition:
Ok it was my own data mistake. In addition to Unit Flag - Hero and Object Type - Hero I had to set Unit Attribute - Heroic My god. How many ways do I have to tell it it's a damn hero!!!
Solved.
Yes that is another alternative solution frostmanx. Thank you for contributing :P.
Unit Flag: Hero makes the unit have a shortcut portrait on the right side of the screen. The user will also have a quick hotkey to select that hero.
Object Type: Hero is used by the editor to organise things. It places it in the Hero folder on the list.
Unit Attribute: Heroic is just an other attribute like Armored, Light, Biological, etc. Like this you can have effects that deal +damage to Heroic units, for example.