Displaying animations

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Displaying animations

Post by Elvish_Pillager »

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?
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.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Try using halo=halo/elder-mage-halo1.png instead of image=halo/elder-mage-halo1.png.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Post by Dacyn »

I think the only way is to put different parts of the image in each square. Here is code that does this:

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}
and similarly to remove the halo.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Dacyn wrote:I think the only way is to put different parts of the image in each square.
No, just use the halo= attribute instead of image=.

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
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

I tried changing all the 'image='s to 'halo='s, but that made it so that nothing happened.
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.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Elvish Pillager wrote:I tried changing all the 'image='s to 'halo='s, but that made it so that nothing happened.
What version are you using?

In 0.7.10, going

Code: Select all

[item]
x,y=10,10
halo=halo/elder-mage-halo1.png 
[/item]
definitely works for me -- it overlays the halo onto the tile specified. Try doing that by itself and see if it works.

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
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

7.9. Time to get 7.10.
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.
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

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.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Elvish Pillager wrote: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!
Which file did you download? Which OS are you using?

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

Mac OSX 0.7.10.dmg, on the downloads page.
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.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Elvish Pillager wrote:Mac OSX 0.7.10.dmg, on the downloads page.
Ahh yes, I think someone mentioned that that has 'issues'.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Post Reply