Using animated unit halos

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
User avatar
Bob_The_Mighty
Posts: 870
Joined: July 13th, 2006, 1:15 pm

Using animated unit halos

Post by Bob_The_Mighty »

For my campaign Altaz Mariners I have an ability which can set a ship on fire. I use an animated halo to show the ship is burning, but the graphics aren't behaving as I'd expected. It looks great apart from when an empty bit of sea starts burning.

There's two problems. 1) When a burning ship dies the ship image goes, but animation remains on the hex. 2) When a burning ship moves away from the hex on which it was set on fire, the animation likewise remains on the hex (curiously, the ship itself continues to show the animation, which is the intended behaviour).

In an 'attacker hits' event I have this code:

Code: Select all

[object]
	silent=yes
	duration=forever
	[filter]
		x,y=$x2,$y2
	[/filter]
	[effect]
		apply_to=halo
		halo=scenery/flames[01~15].png:50
	[/effect]
[/object]
Any ideas?
My current projects:
MP pirate campaign: The Altaz Mariners
RPG sequel: Return to Trent
MP stealth campaign: Den of Thieves
User avatar
inferno8
Art Contributor
Posts: 974
Joined: February 18th, 2008, 5:32 pm
Location: The Abyss

Re: Using animated unit halos

Post by inferno8 »

Hi, Bob ;)
If I were you, I would try to make a "burning" variation of a ship with a [standing_anim] displaying the flames. Then I would use an [object] to switch to that variation in the 'attacker hits' event. I cannot guarantee this approach to work but this should theoretically give you greater control over animations.
Creator of Era of Magic
Creator of To Lands Unknown

Support me on Ko-fi! https://ko-fi.com/inferno8
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Using animated unit halos

Post by zookeeper »

I don't see problem 2 in current master, but I didn't check with 1.13.7. Problem 1 is there, but until it gets fixed it might be easy to workaround it by removing/replacing the halo in a die event or something.
User avatar
Bob_The_Mighty
Posts: 870
Joined: July 13th, 2006, 1:15 pm

Re: Using animated unit halos

Post by Bob_The_Mighty »

I should have mentioned that I noticed this problem in 1.13.7. I've tested it further and it seems to work fine in 1.13.6. Is this likely to be fixed in the next release?

Thanks for the variation tip, inferno8. I'm reluctant to change the code since it worked before, but I think that would be a reasonable workaround.
My current projects:
MP pirate campaign: The Altaz Mariners
RPG sequel: Return to Trent
MP stealth campaign: Den of Thieves
Post Reply