Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 1984

WML Workshop • Re: How to Animate Halos and Scenery? (Plus basic effect stuff)

$
0
0
Let's say I want an event where the camera pans to a spooky castle and then a timely animated lightning bolt strikes a hex.
How do I animate the lightning bolt?
Well, if there is a unit on the hex, you could create an extra animation for the unit. But if you don't want to animate units, you can use the [item] tag.
Example:

Code:

[item]        x=X        y=Y        halo=halo/lightning-bolt-1-[1~4].png:150,misc/blank-hex.png:3000 #A blank hex to avoid repetition. It will give you time to remove the image after.[/item][redraw][/redraw] #Necessary to redraw the screen.[sound]      name=lightning.ogg #Maybe a sound here...[/sound][delay]     time=700 #Add a delay long enough to show the image before removing it. (150 x 4=600) So, 700 to be safe.[/delay]{REMOVE_IMAGE X Y} #Then you can use the macro to remove the image.
It might seem complicated, but it's actually quite simple. If you'll be doing this frequently, I suggest creating a macro. I use this a lot in a campaign I'm working on.
The problem with using the lightning halo in the item tag is that it doesn't look very good; the center of the halo is too high. You would have to place the lightning halo about 2 hexes above.
And let's say I want an event so that any tile you kill an enemy ghoul on has a scenery/flames01-15 animation for 1 turn? Also with a fire-aura halo and a lawful bonus to adjacent units?
That's a bit complicated, but my idea would be to create nested events. Additionally, it would be difficult to keep adding and removing the bonus after each turn. Maybe someone else has an idea.

Statistics: Posted by Saizo-Luz — Yesterday, 5:56 pm



Viewing all articles
Browse latest Browse all 1984

Trending Articles