Need Help with 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.
Need Help with hides ability
Hi,
I tried to create a hides ability.
The ability shows up ingame, but it's set to inactive.
Maybe it's a problem with my code, but I couldn't find the problem.
Other abilities (but which are copied from the base game and not changed, like Heal or Leadership) work fine
Code:
I tried to create a hides ability.
The ability shows up ingame, but it's set to inactive.
Maybe it's a problem with my code, but I couldn't find the problem.
Other abilities (but which are copied from the base game and not changed, like Heal or Leadership) work fine
Code:
Code: Select all
#define ABILITY_SWAMPWALK
# Canned definition of the Swanpwalk ability to be included in an
# [abilities] clause.
[hides]
id=failed swampwalk
name= _ "swampwalk"
female_name= _ "female^swampwalk"
description= _ "This unit can hide in swamps, and remain undetected by its enemies.
Enemy units cannot see this unit while it is in swamp, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
affect_self=yes
[filter]
[filter_location]
terrain=*^Ss*, *^Sm*
[/filter_location]
[/filter]
[/hides]
#enddef
- Lord-Knightmare
- Discord Moderator
- Posts: 2475
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Need Help with hides ability
Swamp terrain is not an overlay. So, you need to adjust those
terrain=
valuesCreator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Need Help with hides ability
You filter for non-core terrains. Either update filter to use core swamp, or check your custom terrain to match what ability expects.
https://github.com/inferno8/wesnoth-Era ... 2306939136
https://github.com/inferno8/wesnoth-Era ... 2306939136
Re: Need Help with hides ability
Thanks for the quik reply