Well, I got around the problem, by using an old version of my add-on. I did all changes again, but this time it worked fine. So I haven't been able to detect the error. sorry to bother you all

next thing I'm working on, are themes. Is it possible to change a theme mid-scenario? I know that there is the theme tag in [scenario]. Is it possible to change this? perhaps using lua or so?Id like to use this for cutscene parts of scenarios.

EDIT: No answer? well i guess I'll have to do without that then.

I've got another question though:while trying to improve cutscenes in my campaign I want to create a dagger that get's thrown away onto a unit that is multiple hexes away. the path is straight, so I'd like to use this code:

pastes the image of a dagger on top. I've tested the code with dugi's image loading tester and there it shows indeed a dagger. Using the above code shows nothing ingame though. You see the screen moving though, as if it's following a unit.Have I found a bug? Does

reduce the entire image to being transparent? Or have I just done something wrong?

REEDIT:Also, another question:I'm trying to limit a units movement to a specific terrain. (namely rails) Is there a way to do it? [movement_costs] seems to do the trick, but it's limited to terrain groups like deep water or mountain. Is there a way to do this?

I had quite similar question in past, it was about lava to make it heal drakes... for this what you want to do you have to create new terrain group and there add your terrain type. You have to set new terrain group as shallow water or other one but with your own name and select there terrains which you prefer.I suggest you to look in to wesnoth core files.

reduce the entire image to being transparent? Or have I just done something wrong?

I'm not sure if that's a bug or not. The documentation for ~O() on the wiki does say it applies at "render time". But the documentation at the bottom says it applies in left-to-right order. So there's a contradiction in the documentation there.

As a workaround, I would suggest trying ~MASK() with a blank transparent hex

while this works as it should I get the error "Invalid WML found: possible deprecated [or] syntax: now forcing re-interpretation" in the top left corner and the stderr.txt file.The wiki documentation doesn't really say anything about this. Can someone tell me what I did wrong?

Paulomat4 wrote:REEDIT:Also, another question:I'm trying to limit a units movement to a specific terrain. (namely rails) Is there a way to do it? [movement_costs] seems to do the trick, but it's limited to terrain groups like deep water or mountain. Is there a way to do this?

For this one, you're in luck. There is a special terrain type associated with rails for exactly that purpose. Just add a movement cost for Rt and you'll be all set. No core unit uses it (so treats it as flat instead) but it's there.

For this one, you're in luck. There is a special terrain type associated with rails for exactly that purpose. Just add a movement cost for Rt and you'll be all set. No core unit uses it (so treats it as flat instead) but it's there.

Hey guys,it's been a long time, but i'm back on working on my campaign.I have a scenario where someone "pushes" back all units that get near him. Those unit have a predefined location where they should go to. If there is already a unit on that location, The code is supposed to search in a radius of 1 around that hex for viable (that pass through the filter) hexes. If noone is found the radius is supposed to get bigger and then check again, and so on.The first round works, the unit is pushed back to it's hex. The second round works as well, the unit goes to one of the three hexes that it can go to. the next unit that is pushed back tries to go to the hex of unit number two though, and I don't know why. Normally the filter should not let hexes pass on that a unit is standing.

@Paulomat4: I have been stucked several times in bugs like you had, they are "stupid" but hard to detect. I have developed an habit that maybe you also find usefull -> As much as possible, I never write new code, I always look for an existing code strucutre (mine most of times) similar to task desired and copy-paste it. Then, to modifify or add keys, I also look to copy-paste those keys from previous code working.

In resume: in my experience write new code from scratch in WML has a high risk to run into bugs "difficult to detect". A fanatical use of copy-paste have reduced a lot, times I run into those situations.

Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.World Conquest II

@Paulomat4: I have been stucked several times in bugs like you had, they are "stupid" but hard to detect. I have developed an habit that maybe you also find usefull -> As much as possible, I never write new code, I always look for an existing code strucutre (mine most of times) similar to task desired and copy-paste it. Then, to modifify or add keys, I also look to copy-paste those keys from previous code working.

In resume: in my experience write new code from scratch in WML has a high risk to run into bugs "difficult to detect". A fanatical use of copy-paste have reduced a lot, times I run into those situations.

Thx for the kind advice. I actually tried to do it that way, but the example I used the first time i wrote this code (a few month ago) turned out to be buggy.

Hey guys,remember me? I'm not dead yet Anyway I've got another question for you guys. Is there a simple way of transferring a selection in the map editor to a location filter in wml?In this case I'd like to filter for any unit moving to one of the selected hexes.

I could of course copy every coordinate manually but that would be tedious. Atm I'm using a range of coordinates

Paulomat4 wrote:Is there a simple way of transferring a selection in the map editor to a location filter in wml?

No, I don't think so. Probably the easiest thing to do is to break your area up into three or four ranges that cover everything with nothing extra. Then use [filter_location] with an [or] statement for each range.