Problem with hide

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
MedalikarzNew
Posts: 17
Joined: October 14th, 2017, 5:48 pm

Problem with hide

Post by MedalikarzNew »

I have a problem. Units in addon sometimes appeare when they sould be hide. I think problem is in wrong code but i cant find where is wrong. Can u help me?

Code: Select all

#define ABILITY_GAL_UKRYCIE
[hides]
id=gal_ukrycie
name="Hiding countrymen"
description="Friendly Units around a unit with this ability will not be able to be seen by the enemy."
affect_self=no
[affect_adjacent]

adjacent=n,ne,se,s,sw,nw

[filter]

		[not]
		race=mechanical,Animals
		[/not]

[/filter]

[/affect_adjacent]
[/hides]
#enddef
User avatar
Eagle_11
Posts: 759
Joined: November 20th, 2013, 12:20 pm

Re: Problem with hide

Post by Eagle_11 »

[hides] ability works on unit self, instead of what you doing give an [hides] ability for the units that are supposed to cloak that filters for adjacent friendly unit that is supposed to enable this.
Zolm
Posts: 29
Joined: May 18th, 2012, 1:30 am

Re: Problem with hide

Post by Zolm »

You need a "affect_allies=yes" command to enable the adjacent verification
Post Reply