Displaying animations
Moderator: Forum Moderators
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
Displaying animations
I'm trying to make a lightning effect, like the halo when Delfador attacks, in an [event] tag. I've tried repeating this for each frame:
[item]
x,y=$x2,$y2
image=halo/elder-mage-halo1.png
[/item]
[redraw]
[/redraw]
[delay]
time=50
[/delay]
[removeitem]
x,y=$x2,$y2
[/removeitem]
It only shows up in the hex it's on. Is there a way to do this?
[item]
x,y=$x2,$y2
image=halo/elder-mage-halo1.png
[/item]
[redraw]
[/redraw]
[delay]
time=50
[/delay]
[removeitem]
x,y=$x2,$y2
[/removeitem]
It only shows up in the hex it's on. Is there a way to do this?
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
I think the only way is to put different parts of the image in each square. Here is code that does this:
and similarly to remove the halo.
Code: Select all
[store_locs]
x,y=$x2,$y2
radius=1
variable=locs
[/store_locs]
#define HALO_PART IMAGE NUMBER
[item]
image={IMAGE}
x,y=$locs[{NUMBER}].x,$locs[{NUMBER}].y
[/item]
#enddef
{HALO_PART halo-north.png 0}
{HALO_PART halo-northeast.png 1}
{HALO_PART halo-southeast.png 2}
{HALO_PART halo-south.png 3}
{HALO_PART halo-southwest.png 4}
{HALO_PART halo-northwest.png 5}
No, just use the halo= attribute instead of image=.Dacyn wrote:I think the only way is to put different parts of the image in each square.
Using halo allows an image that is larger than one tile to be used. The disadvantage is that it tends to be slower to render, and so shouldn't be over-used.
You can even animate it by specifying a comma-seperated list of images.
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
What version are you using?Elvish Pillager wrote:I tried changing all the 'image='s to 'halo='s, but that made it so that nothing happened.
In 0.7.10, going
Code: Select all
[item]
x,y=10,10
halo=halo/elder-mage-halo1.png
[/item]
I haven't tried anything to make it only display for a small amount of time though.
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
I downloaded the file that claims it's 0.7.10. In the game, it says 0.7.9, and seems to be that way too!
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact: