Using animated unit halos

The place to post your WML questions and answers.

Moderators: Developers, 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.

Using animated unit halos

Postby Bob_The_Mighty » April 8th, 2017, 1:49 am

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:
2p Campaign: The Altaz Mariners
3p Survival: Save The Village
User avatar
Bob_The_Mighty
UMC Pioneer
 
Posts: 723
Joined: July 13th, 2006, 1:15 pm

Re: Using animated unit halos

Postby inferno8 » April 8th, 2017, 8:52 am

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.
User avatar
inferno8
Art Contributor
 
Posts: 636
Joined: February 18th, 2008, 5:32 pm
Location: The Abyss

Re: Using animated unit halos

Postby zookeeper » April 8th, 2017, 9:22 am

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
zookeeper
WML Wizard
 
Posts: 9436
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Using animated unit halos

Postby Bob_The_Mighty » April 20th, 2017, 11:02 pm

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:
2p Campaign: The Altaz Mariners
3p Survival: Save The Village
User avatar
Bob_The_Mighty
UMC Pioneer
 
Posts: 723
Joined: July 13th, 2006, 1:15 pm


Return to WML Workshop

Who is online

Users browsing this forum: No registered users and 2 guests