Teleport bug?
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.
Teleport bug?
Hi, I was wondering if anyone could help me with a problem I've been having.
I want to grant my units the "teleport" ability. I use
That grants them the teleport ability, sure, but introduces some bugs which do not exist when the ability is given in the unit's .cfg file. They can no longer teleport from a village they are standing on (they have to get off first); and village owner is completely ignored (they can teleport from an unowned village to an unowned village; presumably also to and from villages owned by other players). I took a peek at the teleport code in abilities.cfg, and I can't understand how it works in the first place--it looks like everything is backwards (as I see it, the code tells it to do exactly what it's doing for me; but should not work properly for the Silver Mage unit).
I'm sorry if this is a bug that was fixed in a later version--I'm running 1.10.0 (yes, I know that's a little out-dated). I don't know why it would be a bug though--the teleport ability has been standard for a good long while.
If this was corrected in a bugfix, could someone tell me? I don't really like reinstalling Wesnoth on a whim. If not, can someone help me get it working properly?
Thanks,
I want to grant my units the "teleport" ability. I use
Code: Select all
[object]
silent=yes
duration=forever
[effect]
apply_to=new_ability
[abilities]
{ABILITY_TELEPORT}
[/abilities]
[/effect]
[/object]
I'm sorry if this is a bug that was fixed in a later version--I'm running 1.10.0 (yes, I know that's a little out-dated). I don't know why it would be a bug though--the teleport ability has been standard for a good long while.
If this was corrected in a bugfix, could someone tell me? I don't really like reinstalling Wesnoth on a whim. If not, can someone help me get it working properly?
Thanks,
Kallin Efinari
---Creator of "LOTE Unit Release", "7p - Afterwards", and "Chain Lightning"
(Working on 1.12 port of "7p - Afterwards")
Managing compatibility between 4000K people's ideas of what happens? Forget it!
---Creator of "LOTE Unit Release", "7p - Afterwards", and "Chain Lightning"
(Working on 1.12 port of "7p - Afterwards")
Managing compatibility between 4000K people's ideas of what happens? Forget it!
Re: Teleport bug?
you need use delayed variable substitution when using TELEPORT macro outside unit_type. One easy way is use an [object] like this:
Code: Select all
[object]
silent=yes
duration=forever
delayed_variable_substitution=yes
[filter]
x,y=$unit.x,$unit.y
[/filter]
[effect]
apply_to=new_ability
[abilities]
{ABILITY_TELEPORT}
[/abilities]
[/effect]
[/object]
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
World Conquest II
Re: Teleport bug?
Wow! It's amazing how something that simple can make such a difference!
It all works perfectly now. Thanks a million!
It all works perfectly now. Thanks a million!
Kallin Efinari
---Creator of "LOTE Unit Release", "7p - Afterwards", and "Chain Lightning"
(Working on 1.12 port of "7p - Afterwards")
Managing compatibility between 4000K people's ideas of what happens? Forget it!
---Creator of "LOTE Unit Release", "7p - Afterwards", and "Chain Lightning"
(Working on 1.12 port of "7p - Afterwards")
Managing compatibility between 4000K people's ideas of what happens? Forget it!
Re: Teleport bug?
easy, you forgot the [volcano] tag!
Re: Teleport bug?
There is no such thing as agrrr wrote:easy, you forgot the [volcano] tag!
[
volcano]
tag in WML.Re: Teleport bug?
Just for information: grrr had been posting lot of troll coments with no sense at all. Thats why the [volcano] tag...8680 wrote:There is no such thing as agrrr wrote:easy, you forgot the [volcano] tag![
volcano]
tag in WML.
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
World Conquest II