Axefighterr's questions
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.
- axefighterr
- Posts: 27
- Joined: May 1st, 2012, 9:16 am
- Location: Poland
- Contact:
Re: Axefighterr's questions
I'm back again. Question: how to make an attack animation where:
* attacker is not moving, but has a frame (like in ranged),
* there is no missile (or blank one can be used),
* there is a halo on attacker,
I wanted to do an animation where attacker explodes, but this is the only i could do:
Anybody knows how to do it?
* attacker is not moving, but has a frame (like in ranged),
* there is no missile (or blank one can be used),
* there is a halo on attacker,
I wanted to do an animation where attacker explodes, but this is the only i could do:
Code: Select all
[attack_anim]
[filter_attack]
name=explosion
[/filter_attack]
[missile_frame]
begin=-150
end=0
image="misc/blank-hex.png"
image_diagonal="misc/blank-hex.png"
[/missile_frame]
[missile_frame]
halo="projectiles/fireball-impact-[1~16].png~FL(vert):60"
offset=0.0
[/missile_frame]
[/attack_anim]
Re: Axefighterr's questions
Check if EoMa_Master_of_Fire inferno animation mechanic is what you wanted.
Re: Axefighterr's questions
uhh something like this?
Code: Select all
offset=0.0
start_time=-600
halo_start_time=-500
[frame]
image=*path here*
[/frame]
[halo_frame]
halo="projectiles/fireball-impact-[1~16].png~FL(vert):60"
[/halo_frame]
Formerly known as the creator of Era of Chaos and maintainer of The Aragwaithi and the Era of Myths.
- axefighterr
- Posts: 27
- Joined: May 1st, 2012, 9:16 am
- Location: Poland
- Contact:
Re: Axefighterr's questions
Ravana, Master of Fire animation fits perfectly. Thanks!
Now another issue: how to give every unit which is damaged by this code a hit and/or death cry? Now it only works for the original target, but should work also for units near the attacker and attacker.
This I have in unit file:
And this in macros (code was made by Jarom):
Now another issue: how to give every unit which is damaged by this code a hit and/or death cry? Now it only works for the original target, but should work also for units near the attacker and attacker.
This I have in unit file:
Code: Select all
...
[advancement]
id=explosion
description=Explosion
always_display=true
image=icons/explosion-red-3.png
require_amla=hp4
max_times=1
[effect]
apply_to=new_attack
name=explosion
description=_"explosion"
icon=icons/explosion-red-3.png
type=fire
range=ranged
damage=50
number=1
[specials]
{WEAPON_SPECIAL_WA_NOCOUNTER}
{WEAPON_SPECIAL_MAGICAL}
{WEAPON_SPECIAL_EXPLOSION}
[/specials]
[/effect]
[effect]
apply_to=max_experience
increase=4
[/effect]
[effect]
apply_to=hitpoints
increase=30%
[/effect]
[/advancement]
{AREA_ATTACK explosion 50 20}
...
Code: Select all
#define AREA_ATTACK_BODY DMG DMG2 X Y X2 Y2
[store_unit]
[filter]
[filter_adjacent]
x,y={X},{Y}
[/filter_adjacent]
[not]
x,y={X2},{Y2}
[/not]
[/filter]
variable=inarea
[/store_unit]
[store_unit]
[filter]
x,y={X},{Y}
[/filter]
variable=damager
[/store_unit]
[if]
[variable]
name=damager.status.slowed
not_equals=yes
[/variable]
[then]
{VARIABLE areadmg {DMG}}
[/then]
[else]
{VARIABLE areadmg {DMG}}
{VARIABLE_OP areadmg divide 2}
[/else]
[/if]
{FOREACH inarea i}
{RANDOM 1..100}
[if]
[variable]
name=random
less_than_equal_to=70
[/variable]
[then]
[harm_unit]
[filter]
x,y=$inarea[$i].x,$inarea[$i].y
[/filter]
[filter_second]
x,y={X},{Y}
[/filter_second]
amount=$areadmg
damage_type=fire
aligment=lawful
fire_event=yes
animate=no
experience=yes
[/harm_unit]
[/then]
[/if]
{NEXT i}
[harm_unit]
[filter]
x,y={X},{Y}
[/filter]
amount={DMG2}
damage_type=fire
aligment=lawful
fire_event=no
animate=no
experience=no
[/harm_unit]
#enddef
#define WEAPON_SPECIAL_EXPLOSION
[dummy]
id=explosion
name= _ "explosion"
description=_"This attack hits all enemies near to the attacker. Additionally attacker receives some damage due to recoil."
[/dummy]
#enddef
#define AREA_ATTACK WEAPON DMG DMG2
[event]
name=attacker hits
first_time_only=no
[filter_attack]
name={WEAPON}
[/filter_attack]
{AREA_ATTACK_BODY {DMG} {DMG2} $x1 $y1 $x2 $y2}
[/event]
[event]
name=attacker misses
first_time_only=no
[filter_attack]
name={WEAPON}
[/filter_attack]
{AREA_ATTACK_BODY {DMG} {DMG2} $x1 $y1 $x2 $y2}
[/event]
#enddef
Re: Axefighterr's questions
Currently you have animate=no and fire_event=no. One of that might affect sounds too.
If that fails you can add sounds to event.
If that fails you can add sounds to event.
- axefighterr
- Posts: 27
- Joined: May 1st, 2012, 9:16 am
- Location: Poland
- Contact:
Re: Axefighterr's questions
Another question: how to enable additional unit advancements (Like Ancient Lich and Dwarvish Arcanister) in UMC Era without making new unit.cfg files? I want make an Era with mixed sets of units on which even people without it could play with me.
Re: Axefighterr's questions
(post)advance event. Can change unit.advances_to.
- axefighterr
- Posts: 27
- Joined: May 1st, 2012, 9:16 am
- Location: Poland
- Contact:
Re: Axefighterr's questions
Can you tell where insert it? In Era_Eras.cfg, _main.cfg or faction.cfg?
Re: Axefighterr's questions
In [era], no matter in which of these files you keep it.
- axefighterr
- Posts: 27
- Joined: May 1st, 2012, 9:16 am
- Location: Poland
- Contact:
Re: Axefighterr's questions
Okay, but how to change unit's advancement via event? Like Inferno Drake -> Armageddon Drake. I tried something here: http://wiki.wesnoth.org/Effectwml but with no results. I just want make an add-on which is not required from second player to play with him. Anybody has any advice?
Re: Axefighterr's questions
{VARIABLE unit.advances_to (Armageddon Drake)} and unstore.
- axefighterr
- Posts: 27
- Joined: May 1st, 2012, 9:16 am
- Location: Poland
- Contact:
Re: Axefighterr's questions
Reviving my old thread with possibly silly question: how to implement a feature in an UNIT.CFG file which will remember how many times you picked a non-standard advancement (like in UtBS)? For example: fighter with 40hp and 10-2 sword attack levels up and can advance in 3 ways: +4hp (infinite), +1 melee damage (infinite), +6-3 mace attack. And I want to be sure that damage bonus will be retroactive when I choose a mace, so there should be no damage difference between damage->mace and mace->damage. I know that it is possible (like in SXC), but i want it to be implemented in an unit file, because my scenario will be more level-driven than money-driven.
Thanks in advance.
Thanks in advance.
Re: Axefighterr's questions
Try with unit.variables.something and on picking new weapon using that value.
Re: Axefighterr's questions
Umm, sorry for asking but i need to learn.
How exactly to use this:
How exactly to use this:
Code: Select all
unit.advances_to
Re: Axefighterr's questions
You can modify that key to change what unit type advancement possibilities that unit has.