How to make a fake attack?
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.
- Ken_Oh
- Moderator Emeritus
- Posts: 2178
- Joined: February 6th, 2006, 4:03 am
- Location: Baltimore, Maryland, USA
How to make a fake attack?
I'm at a loss on how to do this. I think I remember it being in another campaign, but I don't remember where.
I want to make Delfador, who is at coords 25,24 use his nifty halo lightning attack to be triggered by a moveto [event] and have him attack a rock at 24,23.
I've tried just putting this in:
But it's not doing anything. I just don't know where to go from here.
Any help to put me in the right direction is appreciated.
I want to make Delfador, who is at coords 25,24 use his nifty halo lightning attack to be triggered by a moveto [event] and have him attack a rock at 24,23.
I've tried just putting this in:
Code: Select all
[animation]
hits=yes
direction=nw
[frame]
begin=-300
end=-200
image="units/elder-mage-ranged.png"
halo=halo/lightning-bolt-1-1.png:100
halo_x,halo_y=24,23
sound=lightning.ogg
[/frame]
[frame]
begin=-200
end=-100
image="units/elder-mage-ranged.png"
halo=halo/lightning-bolt-1-2.png
halo_x,halo_y=24,23
[/frame]
[frame]
begin=-100
end=100
image="units/elder-mage-ranged.png"
halo=halo/lightning-bolt-1-3.png
halo_x,halo_y=24,23
[/frame]
[frame]
begin=100
end=200
image="units/elder-mage-ranged.png"
halo=halo/lightning-bolt-1-4.png
halo_x,halo_y=24,23
[/frame]
[frame]
begin=200
end=250
image="units/elder-mage-ranged.png"
halo=misc/blank-hex.png
halo_x,halo_y=24,23
[/frame]
[/animation]
Any help to put me in the right direction is appreciated.
Theoretically...
The unit def needs an [extra_anim] tag per http://www.wesnoth.org/wiki/UnitWML and http://www.wesnoth.org/wiki/AnimationWML
Then, in the event that triggers it, you use an [animate_unit] tag per http://www.wesnoth.org/wiki/InterfaceActionsWML
I have never seen it used anywhere, but if someone animates a L1 gryphon rider to rear back I would. Maybe you're thinking of Delfador in Plunging into the Darkness. However, this isn't used. The sound is played and the screen flashes white.
The unit def needs an [extra_anim] tag per http://www.wesnoth.org/wiki/UnitWML and http://www.wesnoth.org/wiki/AnimationWML
Then, in the event that triggers it, you use an [animate_unit] tag per http://www.wesnoth.org/wiki/InterfaceActionsWML
I have never seen it used anywhere, but if someone animates a L1 gryphon rider to rear back I would. Maybe you're thinking of Delfador in Plunging into the Darkness. However, this isn't used. The sound is played and the screen flashes white.
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
- Ken_Oh
- Moderator Emeritus
- Posts: 2178
- Joined: February 6th, 2006, 4:03 am
- Location: Baltimore, Maryland, USA
Ah, very good. Honestly, when I said I thought I remembered something liek it happening in a campaign, I must have been thinking of some other game.
I looked it through and here's part of what I put into a test scenario:
Below is what I inserted into a copied version of Elder Mage.cfg:
When "second" gets to 15,15, he stops and the game freezes. I can select stuff with the mouse, see stats and unit descriptions, but it's perpetually stuck on the ai turn (which is exactly what happened when I tried to put all this into my real campaign).
If anyone can give it a look-down, then thanks in advance. I'm getting sleepy and if I can't find anything obvious after I post this, I'll call it a night.
I looked it through and here's part of what I put into a test scenario:
Code: Select all
[side]
side=3
type=Elder Mage
description=second
user_description= _ "Second"
unrenamable=yes
controller=ai
team_name=teamone
canrecruit=1
recruit=Peasant
gold=50
[/side]
[event]
name=ai turn
first_time_only=no
{MODIFY_UNIT description=second goto_x 15}
{MODIFY_UNIT description=second goto_y 15}
[/event]
[event]
name=moveto
[filter]
x,y=15,15
[/filter]
[if]
[have_unit]
description=second
x=15
y=15
[/have_unit]
[then]
[scroll_to]
x=15
y=15
[/scroll_to]
[animate_unit]
flag=blast
[filter]
description=second
[/filter]
[/animate_unit]
[/then]
[/if]
[/event]
Code: Select all
[extra_anim]
[animation]
flag=blast
direction=nw
[frame]
begin=-300
end=-200
image="units/elder-mage-ranged.png"
halo=halo/lightning-bolt-1-1.png:100
halo_x,halo_y=-1,-1
sound=lightning.ogg
[/frame]
[frame]
begin=-200
end=-100
image="units/elder-mage-ranged.png"
halo=halo/lightning-bolt-1-2.png
halo_x,halo_y=-1,-1
[/frame]
[frame]
begin=-100
end=100
image="units/elder-mage-ranged.png"
halo=halo/lightning-bolt-1-3.png
halo_x,halo_y=-1,-1
[/frame]
[frame]
begin=100
end=200
image="units/elder-mage-ranged.png"
halo=halo/lightning-bolt-1-4.png
halo_x,halo_y=-1,-1
[/frame]
[frame]
begin=200
end=250
image="units/elder-mage-ranged.png"
halo=misc/blank-hex.png
halo_x,halo_y=-1,-1
[/frame]
[/animation]
[/extra_anim]
If anyone can give it a look-down, then thanks in advance. I'm getting sleepy and if I can't find anything obvious after I post this, I'll call it a night.
what would be extremely useful (and this has been brought up before) is a tag to make a unit attack another... and be able to give the random numbers used (so you can determine how much damage is done). That would solve the problem here nicely.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Aye aye.Boucman wrote:post a feature request and assign it to me, that's very doable with the current engine
I will implement it post 1.2
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm