Problems with hitpoint effect commands
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.
Problems with hitpoint effect commands
You think I would have learned my lesson with all the trouble I had slowing and unslowing units using objects and effects. But now I'm having trouble using objects and effects to change a unit's hitpoints. I'm basing my work off the WML section for hitpoint effects:
"hitpoints" modifies the unit HP and/or max HP
increase the amount to increase the unit's HP
heal_full if present and not set to "no" the unit will be put back to full
I think that there may be bugs with the increase and heal_full commands. I tried:
and nothing happened.
Can anyone confirm that commands such as heal_full actually work as they are supposed to when changing hitpoints?
I normally use [store_unit] to edit hitpoints, but the heal_full command seem so useful when trying to heal a unit to full hitpoints.
"hitpoints" modifies the unit HP and/or max HP
increase the amount to increase the unit's HP
heal_full if present and not set to "no" the unit will be put back to full
I think that there may be bugs with the increase and heal_full commands. I tried:
Code: Select all
[effect]
apply_to=hitpoints
heal_full=yes
[/effect]
Can anyone confirm that commands such as heal_full actually work as they are supposed to when changing hitpoints?
I normally use [store_unit] to edit hitpoints, but the heal_full command seem so useful when trying to heal a unit to full hitpoints.
Creator of Under the Burning Suns
I tried the following, and it works just fine.
(I simply edited a savefile of the test scenario)
Code: Select all
[event]
first_time_only="no"
name="moveto"
[filter]
x="12"
y="4"
[/filter]
[object]
cannot_use_message=_ "You are not worthy of healing."
description=_ "A feeling of well-being overwhelms the drinker."
duration="level"
id="OBJ3"
image="misc/item-healingpotion.png"
name=_ "Potion of Healing"
[filter]
x="12"
y="4"
[/filter]
[then]
[removeitem]
x="12"
y="4"
[/removeitem]
[/then]
[effect]
apply_to="hitpoints"
heal_full="yes"
[/effect]
[/object]
[/event]
Thanks silene. It's probably just a problem with my scenario somehow. Just wanted to check, since I figured it wasn't used very often in campaigns.
Creator of Under the Burning Suns