hiding a unit with the hides ability

The place to post your WML questions and answers.

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.
Post Reply
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

hiding a unit with the hides ability

Post by Rhuvaen »

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:

Code: Select all

      [abilities]
        [hides]
          name= _ "spelunking"
          name_inactive= _ "spelunking"
          affect_self=yes
          [filter_self]
          [/filter_self]
        [/hides]      
      [/abilities]
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. :(
Xan
Inactive Developer
Posts: 258
Joined: August 28th, 2005, 3:05 pm
Contact:

Post by Xan »

Odd... that's Single Unit WML? If so, that might be the reason (and also a bug).
"It is time people learned about their failures and my successes."
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

Xan wrote:Odd... that's Single Unit WML? If so, that might be the reason (and also a bug).
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).
Post Reply