Scenario Problems

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
Vendanna
Posts: 624
Joined: September 16th, 2006, 10:07 pm
Location: Spain

Scenario Problems

Post by Vendanna »

I'm fiddling with the scenarios wml for fun, and I choosed as starting point to modify the campaing "Attack of the undead" as base (because its a short campaing, and its easier to modify a campaing that start one from scratch)

During the introduction, I wanted the talking partner to banish playing the death animation (its a dark adept female) leaving the cloak behind.

Problem is that it looks like the animation plays too fast, or its skipped sometimes (or that's what I think I'm seeing)

this is a part of the event code, the speeches are temporal but catch the main idea I wanted.

Code: Select all

		[message]
			speaker=Ryan
			message= _ "Argh! What happens to my body?"
		[/message]
		[message]
			speaker=Deven
			message= _ "It's the effect of the curse, In three days the weight of your evil deeds will petrify your body, it isn't nice? Hehehehee..."
		[/message]
		[kill]
			description=Deven
			animate=yes
		[/kill]
		[message]
			speaker=narrator
			message= _ "Deven dissapears with a unholy laugh."
		[/message]	
		[redraw]
		[/redraw]
		[message]
			speaker=Ryan
			message= _ "Wait!"
		[/message]
I don't know why sometimes plays nicely the death animation, and sometimes it seems to skip (probably because there is still talking after that?)

Probably I'll add as item on ground the cloak of the adept after its death, so it doesn't dissapear with the unit, to add a bit more of flavor to the "cinematic" of the introduction.

Thanks for your time.
Last edited by Vendanna on February 20th, 2008, 7:10 pm, edited 1 time in total.
"Mysteries are revealed in the light of reason."
CIB
Code Contributor
Posts: 625
Joined: November 24th, 2006, 11:26 pm

Post by CIB »

Maybe splitting the event into two works?
User avatar
Vendanna
Posts: 624
Joined: September 16th, 2006, 10:07 pm
Location: Spain

Post by Vendanna »

I know what you meant, but not if the way I did it its the correct one.

I'll post here the scenario cfg file, if it is needed the entire campaing (not too long and still in development) I can upload it too so you can also test it.

As a note, I have specified the delay between frames on the extra_anim tag inside the unit (Deven.cfg) so it should play (and plays very fast) when I call it from the event.

Ideally, I want the scenario tell a tale, the caster to launch a missile to our hero (playing casting animation, move a missile graphic over our hero that should play the get hit/defend animation) and then dissapear leaving a cloak in the ground.
Attachments
0_Introduction.cfg
Introductory scenario cfg for Tales of Valor campaing, using attack of the undead as a "wml guide"
(4.58 KiB) Downloaded 95 times
"Mysteries are revealed in the light of reason."
User avatar
Vendanna
Posts: 624
Joined: September 16th, 2006, 10:07 pm
Location: Spain

Post by Vendanna »

Also, here is the zip file.

As a note, only the introductory scenario (first one) is what I'm working on, the second one was a test map, and the rest of the maps are from the attack of the undead and shall be ignored since they will be later be removed.

I desire to get rid of the "playing too fast" animation before advancing more, since I intended to use a few "cinematics" during the gameplay.

Thanks for your time.
Attachments
Tales_of_Valor.zip
Zip with the files for testing purposes.
(114.53 KiB) Downloaded 97 times
"Mysteries are revealed in the light of reason."
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

My guess is that it's because the [kill] action is a direct action. See it this way, the game continues as soon as the message is displayed. That means the [kill] happens when the player is not looking (it's not waiting for the dialog to close).

Move the [kill] one dialog back (after the "Deven disappears with an unholy laugh"). That should look better.
User avatar
Vendanna
Posts: 624
Joined: September 16th, 2006, 10:07 pm
Location: Spain

Post by Vendanna »

Rhuvaen wrote:My guess is that it's because the [kill] action is a direct action. See it this way, the game continues as soon as the message is displayed. That means the [kill] happens when the player is not looking (it's not waiting for the dialog to close).

Move the [kill] one dialog back (after the "Deven disappears with an unholy laugh"). That should look better.
Do you refer something like this?
[message]
speaker=Ryan
message= _ "What?"
[/message]
[message]
speaker=Ryan
message= _ "Argh! What happens to my body?"
[/message]
[message]
speaker=Deven
message= _ "It's the effect of the curse I just inflict upon you, In three days the weight of your evil deeds will petrify your body, it isn't awesome? Hehehehee..."
[/message]
[kill]
description=Deven
animate=yes
[/kill]

[message]
speaker=narrator
message= _ "Deven dissapears with a unholy laugh."
[/message]
[redraw]
[/redraw]
[item]
x=9
y=8
image=scenery/cloak-sw.png
[/item]
Because if that's what you mean, it doesn't work (even if I move the redraw and put it after the kill tag like it was previously)

Sometimes it will play too fast, and sometimes the animation will play without problems (most of the time it seems, maybe my mouse is misclicking?)

Anyhow, the worst offender is the extra_animation that is constantly playing too fast, the missile moves nicely but you can't really see her casting the spell. =/
"Mysteries are revealed in the light of reason."
User avatar
Vendanna
Posts: 624
Joined: September 16th, 2006, 10:07 pm
Location: Spain

Post by Vendanna »

Well, it seems I managed to do some progress here.

The animation doesn't display on that exact moment for some reason that I don't comprenhend, but as stated it plays perfectly with the second "healing" animation Deven.

I also managed to call the idling animation of the thug and the attack anim, but don't know how to make the defend animation to play.

there is a fragment of it. if you need the rest of the files for checking, please ask.
[message]
speaker=Deven
message= _ "Sadly for you, his arrival must go unnoticed for now, so you cannot be spared."
[/message]
[message]
speaker=narrator
message= _ "Deven waves his arms and a green glowing missile struck Ryan on the chest."
[/message]
[message]
speaker=Ryan
message= _ "What?"
[/message]
[animate_unit]
flag=healing
[filter]
description=Deven
[/filter]
[/animate_unit]

[move_unit_fake]
type=cursemissile
side=2
x=9,7
y=7,8
[/move_unit_fake]
[animate_unit]
flag=idling
[filter]
description=Ryan
[/filter]
[/animate_unit]
[animate_unit]
flag=healing
[filter]
description=Deven
[/filter]
[/animate_unit]

[message]
speaker=Ryan
message= _ "Argh! What happens to my body?"
[/message]
Attachments
0_Introduction.cfg
updated version of the introduction cfg.
(4.8 KiB) Downloaded 107 times
"Mysteries are revealed in the light of reason."
User avatar
Vendanna
Posts: 624
Joined: September 16th, 2006, 10:07 pm
Location: Spain

Post by Vendanna »

Well, I just enocuntered something weird.

The animation of the dark adept "casting" the spell that will launch plays now, but only if you click fast during the "talk part" instead of waiting to read it all. (normal read speed)

So if you click fast to pass all the talk, the anims plays without problems, but if you wait to read the text, the "cast curse" animation will not play and you will only see the missile flying.

It's that a bug? :?
"Mysteries are revealed in the light of reason."
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

Vendanna wrote:Do you refer something like this?
Huh. I can't see a difference here from before?

I meant this:
[message]
speaker=Ryan
message= _ "What?"
[/message]
[message]
speaker=Ryan
message= _ "Argh! What happens to my body?"
[/message]
[message]
speaker=Deven
message= _ "It's the effect of the curse I just inflict upon you, In three days the weight of your evil deeds will petrify your body, it isn't awesome? Hehehehee..."
[/message]
[message]
speaker=narrator
message= _ "Deven dissapears with a unholy laugh."
[/message]
[kill]
description=Deven
animate=yes
[/kill]

[redraw]
[/redraw]
[item]
x=9
y=8
image=scenery/cloak-sw.png
[/item]
User avatar
Vendanna
Posts: 624
Joined: September 16th, 2006, 10:07 pm
Location: Spain

Post by Vendanna »

Rhuvaen wrote:Huh. I can't see a difference here from before?

I meant this:
[message]
speaker=Ryan
message= _ "What?"
[/message]
[message]
speaker=Ryan
message= _ "Argh! What happens to my body?"
[/message]
[message]
speaker=Deven
message= _ "It's the effect of the curse I just inflict upon you, In three days the weight of your evil deeds will petrify your body, it isn't awesome? Hehehehee..."
[/message]
[message]
speaker=narrator
message= _ "Deven dissapears with a unholy laugh."
[/message]
[kill]
description=Deven
animate=yes
[/kill]

[redraw]
[/redraw]
[item]
x=9
y=8
image=scenery/cloak-sw.png
[/item]
Ok, now I understand what you mean, the previous thing I did was setting apart the kill tag from the redraw tag.

Anyway, I found the culprit of the animation don't playing. It seems that if you let time pass, the animation will not appear (its skipped), aka if you stop to read all the things the characters say.

If you skimming over the talk to "start" the scenario by clicking fast and pass it as fast as you can, the animation plays correctly.

I can attach the campaing if needed so you can see what I meant. Since that's probably a bug. (since it should play the animation irregardless of the time spent reading the talk)
"Mysteries are revealed in the light of reason."
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Post by Boucman »

I think I see what's going on...

could you try adding a [redraw] before the [kill]

this is probably linked to the time you take getting rid of the window BEFORE the kill event
Fight key loggers: write some perl using vim
User avatar
Vendanna
Posts: 624
Joined: September 16th, 2006, 10:07 pm
Location: Spain

Post by Vendanna »

Boucman wrote:I think I see what's going on...

could you try adding a [redraw] before the [kill]

this is probably linked to the time you take getting rid of the window BEFORE the kill event
I did what you just said, and now its working as it should.

Thank you :)
"Mysteries are revealed in the light of reason."
wsultzbach
Posts: 245
Joined: November 28th, 2006, 12:42 am

Post by wsultzbach »

Boucman wrote:I think I see what's going on...

could you try adding a [redraw] before the [kill]

this is probably linked to the time you take getting rid of the window BEFORE the kill event
I was going to mention that, I had the same problem when I was writing the scenario.
What's this annoying thing that appears at the bottom of every one of my posts?
Post Reply