hiding a unit with the hides ability
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
hiding a unit with the hides ability
I'm trying to hide an AI leader that I have to put on the map somewhere for elegance reasons. I've been thinking about using a variety of ambush to accomplish this. However, I just couldn't get it to work!
This is what I include in the [unit] tag:
I just gave it a name for fun to see if it would show up - it didn't! 
I figured an empty filter would always hide the unit... I also tried it without the filter_self and with a full filter_self/filter_location combo. The unit never hid, and never displayed the ability.
This is what I include in the [unit] tag:
Code: Select all
[abilities]
[hides]
name= _ "spelunking"
name_inactive= _ "spelunking"
affect_self=yes
[filter_self]
[/filter_self]
[/hides]
[/abilities]

I figured an empty filter would always hide the unit... I also tried it without the filter_self and with a full filter_self/filter_location combo. The unit never hid, and never displayed the ability.

Try some Multiplayer Scenarios / Campaigns
Yes, it's Single Unit WML, and I'm also doing it in a totally undocumented way (but one which should work the same way as modifying unit variables).Xan wrote:Odd... that's Single Unit WML? If so, that might be the reason (and also a bug).
Try some Multiplayer Scenarios / Campaigns