I'm working on an RPG map, and one of the heroes has a morph spell.
This trigger runs when he changes into his new form (ignore some of the set variables, I know I don't use all of them, but they're there for messing around).
The return to normal trigger.
Now, I'm wondering how I'd go about increasing his HP by a percentage.
Example.
His max HP is 1000 (including bonuses from strength/items etc), then I want to increase that by say, 5%. Then, once he returns to normal, have his HP decrease back to what it was (down by 5%).
Thanks for taking the time to read this, and I'm grateful for any assistance you provide.
This trigger runs when he changes into his new form (ignore some of the set variables, I know I don't use all of them, but they're there for messing around).
Trigger:
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Fire Form |cffeee24f[E]|r
- Actions
- Set Fire_Form_Caster = (Triggering unit)
- Set Fire_Form_Point = (Position of Fire_Form_Caster)
- Set Fire_Form_Level = (Hero level of (Triggering unit))
- Special Effect - Create a special effect at Fire_Form_Point using Units\NightElf\Wisp\WispExplode.mdl
- Special Effect - Create a special effect at Fire_Form_Point using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
- Player - Disable Circle Spell for (Owner of (Triggering unit))
- Player - Disable Freezing Field |cffeee24f[W]|r for (Owner of (Triggering unit))
- Special Effect - Destroy (Last created special effect)
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation(udg_Fire_Form_Point)
The return to normal trigger.
Trigger:
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Unit-type of (Triggering unit)) Equal to Fire Form
- Actions
- Set Fire_Form_Caster = (Triggering unit)
- Player - Enable Circle Spell for (Owner of (Triggering unit))
- Player - Enable Freezing Field |cffeee24f[W]|r for (Owner of (Triggering unit))
Now, I'm wondering how I'd go about increasing his HP by a percentage.
Example.
His max HP is 1000 (including bonuses from strength/items etc), then I want to increase that by say, 5%. Then, once he returns to normal, have his HP decrease back to what it was (down by 5%).
Thanks for taking the time to read this, and I'm grateful for any assistance you provide.