Trying to get the Marauder Boatsman to work correctly
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.
Trying to get the Marauder Boatsman to work correctly
There are two events here. The first is supposed to make it so whenever a Marauder Boatsman moves onto land, his static image switches to boatsman-land.png. The second should make it so whenever one moves onto water, he goes back to boatsman.png.
What actually happens, though, is the first move made by the Boatsman, it switches to boatsman-land.png (boatsman.png is the default image), and after that the image stays the same no matter what the boatsman does. And if I change the [filter_location] tags to [filter], it makes it so the image never changes.
What actually happens, though, is the first move made by the Boatsman, it switches to boatsman-land.png (boatsman.png is the default image), and after that the image stays the same no matter what the boatsman does. And if I change the [filter_location] tags to [filter], it makes it so the image never changes.
Code: Select all
[event]
name=moveto
first_time_only=no
[filter]
[not]
[filter_terrain]
terrain=s,c,w,k
[/filter_terrain]
[/not]
type=Marauder Boatsman
[/filter]
[store_unit]
[filter]
x,y=$x1,$y1
[/filter]
variable=temp
[/store_unit]
[set_variable]
name=temp.image
value="units/marauder/boatsman-land.png"
[/set_variable]
[unstore_unit]
variable=temp
[/unstore_unit]
[clear_variable]
name=temp
[/clear_variable]
[allow_undo]
[/allow_undo]
[/event]
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
That's actually what it originally was when I got the problem - then I switched it to [filter] to see if it worked, which it didn't, and I switched it back incorrectly to [filter_terrain].Xan wrote:It's [filter_location], not [filter_terrain].
So, there is still a problem if I use [filter_location]. Any ideas?
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Sorry, apparently the other one didnt' copy correctly... here's what hte code looks like:
These lines are at the end of the unit.cfg file.
Code: Select all
[event]
name=moveto
first_time_only=no
[filter]
[not]
[filter_location]
terrain=s,c,w,k
[/filter_location]
[/not]
type=Marauder Boatsman
[/filter]
[store_unit]
[filter]
x,y=$x1,$y1
[/filter]
variable=temp
[/store_unit]
[set_variable]
name=temp.image
value="units/marauder/boatsman-land.png"
[/set_variable]
[unstore_unit]
variable=temp
[/unstore_unit]
[clear_variable]
name=temp
[/clear_variable]
[allow_undo]
[/allow_undo]
[/event]
[event]
name=moveto
first_time_only=no
[filter]
[filter_location]
terrain=s,c,w,k
[/filter_location]
type=Marauder Boatsman
[/filter]
[store_unit]
[filter]
x,y=$x1,$y1
[/filter]
variable=temp
[/store_unit]
[set_variable]
name=temp.image
value="units/marauder/boatsman.png"
[/set_variable]
[unstore_unit]
variable=temp
[/unstore_unit]
[clear_variable]
name=temp
[/clear_variable]
[allow_undo]
[/allow_undo]
[/event]
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
OK. Thanks.Xan wrote:Whoops. It turned out there was a bug where the last [event] could be lost. So you can work around this bug until the next release be adding a fake event after the last real one.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
As I mentioned in the Fall of Silvium thread, I applied this knowledge and now they display the correct frame, but because of the transparency effect in water it looks like they sit in a sunk tub . Any way to turn this off for them?
Try some Multiplayer Scenarios / Campaigns
You can set unit.flying=yes for the boat variation - I think you can't put that in the unit variation definition though, but must modify that variable in the event that flips the water/land variations around.Rhuvaen wrote:As I mentioned in the Fall of Silvium thread, I applied this knowledge and now they display the correct frame, but because of the transparency effect in water it looks like they sit in a sunk tub . Any way to turn this off for them?
Since the standing frame will never appear in the water (it will always be the boat frame), why can't you just make him always flying?
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Maybe you can invoke the flies attribute when the unit is stored. Its effect is to not submerge the unit. Another idea could be to modify the unit sprite to move it up in the hex (if I understand the issue correctly).Rhuvaen wrote:As I mentioned in the Fall of Silvium thread, I applied this knowledge and now they display the correct frame, but because of the transparency effect in water it looks like they sit in a sunk tub . Any way to turn this off for them?
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
I don't have current SVN - it will take me at least 30 minutes to download and compile. I'll report back then.bruno wrote:Can you retest this with current SVN?
Xan's original fix caused some other problems. I now have one that fixes those other problems, but I am not sure about yours.
If you can test it, can you provide source and instructions for how to test it?
If you don't want to wait, you can just download the Imperial Era and move around the Marauder Boatsman contained therein. The WML for the unit has not changed since that version.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm