Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Add to either the unit search filter or the for group loop a test to check if the filter/picked unit owner is an ally of the casting/triggering unit owner.guys i made are damaging spell with "Deal damage based on hero’s attribute points" part of the code but then it damages my units in the area too any idea what condition i need to add for preventing allied units taking damage from that spell ?
III. Custom auras
What about making an aura that gives a special skill for nearby friendly/enemy units? In this example we’ll make an aura that gives 4%/8%/12% chance for nearby friendly units to regenerate 15/30/45 hit points on each attack. The trigger is simple but it has a problem:
Maybe you already see the problem: we cannot detect the level of the aura! There’s no such an action to do so. This is the main issue why I included this type of ability in this tutorial. We have to make a trick.
RegenAura
Events
Unit - A unit Is attacked
Conditions
((Attacking unit) has buff <aura’s buff>) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
<chance> Greater than or equal to (Random integer number between 1 and 100)
Then - Actions
Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + <regen bonus>)
Else - Actions
Make separate buffs for each level!! That’s the key. This way, we can detect which buff the affected unit has, so we can get the exact level of the aura. Example:
Level 1 – Stats – Buffs Regen Aura (level 1)
Level 2 – Stats – Buffs Regen Aura (level 2)
Level 3 – Stats – Buffs Regen Aura (level 3)
The trigger must be modified this way:
After detecting which buff the unit has, we set the variable (Level) to the appropriate value, and we can use it to calculate other values like the chance and the regen value to fit level-stats. And there you go!
RegenAura
Events
Unit - A unit Is attacked
Conditions
Or - Any (Conditions) are true
Conditions
((Attacking unit) has buff Regen Aura (level 1)) Equal to True
((Attacking unit) has buff Regen Aura (level 2)) Equal to True
((Attacking unit) has buff Regen Aura (level 3)) Equal to True
Actions
If (((Attacking unit) has buff Regen Aura (level 1)) Equal to True) then do (Set Level = 1) else do (Do nothing)
If (((Attacking unit) has buff Regen Aura (level 2)) Equal to True) then do (Set Level = 2) else do (Do nothing)
If (((Attacking unit) has buff Regen Aura (level 3)) Equal to True) then do (Set Level = 3) else do (Do nothing)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level x 4) Greater than or equal to (Random integer number between 1 and 100)
Then - Actions
Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + ((Real(Level)) x 15.00))
Else - Actions
Hello guys, I have a question regarding the spell description in the object editor - if I base the spell damage on attribute + bonus, is there any way of showing this amount of data (the damage it does, which is varied by the value of attribute) in the description of the spell?
Firebolt

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Firebolt

Actions


Ability - Set Ability: (Unit: (Casting unit)'s Ability with Ability Code: Firebolt )'s Real Level Field: Damage ('Htb1') of Level: ((Level of Firebolt for (Casting unit)) - 1) to (((Real((Level of Firebolt for (Casting unit)))) x 10.00) + ((Real((Intelligence of (Casting unit) (Include bonuses)))) x (3.00 + Spellpower[(Player number of (Owner of (Casting unit)))])))
but so far it makes sense. Cheers!I suggest you open a thread in the WEHZ (World Editor Help Zone) and include your triggers in the post. that is probably a better way to get help than posting in the comment section of a tutorial from 2007Hey,
first of all thanks for those nice examples!
I'm struggeling myself getting a kind of blink spell to work. My hero teleports behind the enemy and does his damage but then he has a high probability to wander off and attack another enemy even if the trigger tells him otherwise. Could you please help me?
I'll include the map if possible.
I'm also interested in some skills like shockwave stampede or healing spell (based on channel) which are attribute based. Could you help me there too?
Thanks in advance!

Hello everyone,
What if I want to make a unit type (in my case: Sapphiron(living), able to be built from the Boneyard) to exist only one at a time (like the Mothership in SCII)?
P/s: Pardon my English if there is any mistake.
I suggest you open a thread in the WEHZ (World Editor Help Zone) and include your triggers in the post. that is probably a better way to get help than posting in the comment section of a tutorial from 2007![]()
I already opened the thread and it was taken care of.I suggest you open a thread in the WEHZ (World Editor Help Zone) and include your triggers in the post. that is probably a better way to get help than posting in the comment section of a tutorial from 2007![]()
