- Joined
- Feb 20, 2014
- Messages
- 409
Hi!
Is there a way to edit this spell to make it deals damage based on agility?
What would the action be?
Is there a way to edit this spell to make it deals damage based on agility?
What would the action be?
Yes I know how to do it, my problem is about the action : How am I suppose to set the damage points? AOE ability and single target is easy but fan of knives isn't. don't know how to do it.Any spell that deals stat damage should be triggered
You're using (picked unit) in your unit in your initial unit group check, if you use matching unit you must use (matching unit)
Additionally consider this tutorial on the subject:
Convenient Unit Group Filtering in GUI
I read the tutorial you sent me (very useful thanks) now it works BUT it only kills 1 ennemy unit (in the range). It doesn't kil all of them.
- Event
- Unit - A unit starts to cast an ability
- Conditions
- (Ability being cast) Equal to Fan of Knives
- Actions
- Set caster = (Triggering unit)
- Set Player = (Triggering player)
- Set UnitGroup = (Units within 600.00 of (Position of caster))
- Set agilityE = (Agility of (Triggering unit) (Inclure bonuses))
- Set agility = (Real(agilityE))
- Unit Group - Pick every unit in UnitGroup and do (Actions)
- Boucle - Actions
- Set TempUnit = (Picked unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- (TempUnit is alive) Equal to TRUE
- (TempUnit belongs to an enemy of Player) Equal to TRUE
- (Level of Fan of Knives (GOT) for (Triggering unit)) Equal to 1
- Alors - Actions
- Unit - Cause caster to damage TempUnit, dealing (100000.00 + (agility x 1.00)) damage of attack type Sorts and damage type Universel
- Sinon - Actions
- What is wrong?
This trigger should only kill 1 target. What you are doing in your "pick every unit" loop is going through every units, and then setting a single unit variable to that unit.
In other words, if you get 4 units with that pick loop, this will happen:
-TempUnit = Unit 1
-TempUnit = Unit 2
-TempUnit = Unit 3
-TempUnit = Unit 4
End result: TempUnit = Unit 4.
You have no reference to Unit 1, 2, and 3.
Instead, you need to put the IF statement into the unit group loop and run the actions from there.
Something like this should work. There may be a formatting issue as I text edited it though.
- Event
- Unit - A unit starts to cast an ability
- Conditions
- (Ability being cast) Equal to Fan of Knives
- Actions
- Set caster = (Triggering unit)
- Set Player = (Triggering player)
- Set UnitGroup = (Units within 600.00 of (Position of caster))
- Set agilityE = (Agility of (Triggering unit) (Inclure bonuses))
- Set agility = (Real(agilityE))
- Unit Group - Pick every unit in UnitGroup and do (Actions)
- Boucle - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Si - Conditions
- ((Picked Unit) is alive) Equal to TRUE
- ((Picked Unit) belongs to an enemy of Player) Equal to TRUE
- (Level of Fan of Knives (GOT) for (Triggering unit)) Equal to 1
- Alors - Actions
- Unit - Cause caster to damage (Picked Unit), dealing (100000.00 + (agility x 1.00)) damage of attack type Sorts and damage type Universel
- Sinon - Actions
Glad to hear.It works thank you very much