How to change side leader hitpoints?
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.
- Pentarctagon
- Project Manager
- Posts: 5527
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: How to change side leader hitpoints?
not related to this, but in the future could you make a single thread for your current (and future) WML questions? you have 7 threads on page 1 now, and that's a bit excessive.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
-
- Developer
- Posts: 546
- Joined: January 12th, 2011, 2:18 am
- Location: Pennsylvania, USA
Re: How to change side leader hitpoints?
I'm stumped as to why your latest [side] tag doesn't work, but this should work, and since it seems like you want to start your leader off with different HP, place this code in a prestart event
Code: Select all
[modify_unit]
[filter]
id=Rhaxiz
[/filter]
hitpoints=50
[/modify_unit]
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
Re: How to change side leader hitpoints?
Well i wanna specify my problems. And if i would ask all in same thread should i call it: My all wml problems?Pentarctagon wrote:not related to this, but in the future could you make a single thread for your current (and future) WML questions? you have 7 threads on page 1 now, and that's a bit excessive.
edit: altought you guys has been really helpfull.
edit2: sigurd dragon now it is working but it looks kinda stubid cause my leader got 52/38HP should i try max_hitpoints or something like that?
"This game cured me of my real life addiction."
-Flameslash
-Flameslash
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: How to change side leader hitpoints?
Use [object] and set object.effect.increase_total=14 and object.effect.heal_full=yes. EffectWML
Re: How to change side leader hitpoints?
Or just use max_hitpoints in modify_unit, as you suggested.
Co-Creator of The Fellowship of the Clay (BfW 1.10) ~~ Maintainer of the German Code of Conduct
How to isolate problematic WML code ~~ WML error messages and their reasons
How to isolate problematic WML code ~~ WML error messages and their reasons
- Pentarctagon
- Project Manager
- Posts: 5527
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: How to change side leader hitpoints?
you could, though you can edit the thread title as you encounter new problems.Alluton wrote:Well i wanna specify my problems. And if i would ask all in same thread should i call it: My all wml problems?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: How to change side leader hitpoints?
That sounds good.you could, though you can edit the thread title as you encounter new problems.
"This game cured me of my real life addiction."
-Flameslash
-Flameslash
Re: How to change side leader hitpoints?
Just add this inside the event:
{ADD_HP_LEADER SIDE HPADD}
notes:
SIDE=replace with the units side
you can replace side with $side_number if the event triggers during your turn
HPADD=replace with the amount of hp you wish to add
{ADD_HP_LEADER SIDE HPADD}
notes:
SIDE=replace with the units side
you can replace side with $side_number if the event triggers during your turn
HPADD=replace with the amount of hp you wish to add
Spoiler:
Flyro
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Re: How to change side leader hitpoints?
Thanks flyro but i get it working already.(forgot to change thread status..)
"This game cured me of my real life addiction."
-Flameslash
-Flameslash