1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Fan of Knives

Discussion in 'World Editor Help Zone' started by GrandMaitre, May 25, 2019.

  1. GrandMaitre

    GrandMaitre

    Joined:
    Feb 20, 2014
    Messages:
    403
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Hi!

    Is there a way to edit this spell to make it deals damage based on agility?
    What would the action be?
     
  2. Aeryn

    Aeryn

    Joined:
    Apr 17, 2017
    Messages:
    297
    Resources:
    0
    Resources:
    0
    Any spell that deals stat damage should be triggered
     
  3. GrandMaitre

    GrandMaitre

    Joined:
    Feb 20, 2014
    Messages:
    403
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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.
     
  4. Chaosium

    Chaosium

    Joined:
    Aug 29, 2012
    Messages:
    416
    Resources:
    2
    Models:
    2
    Resources:
    2
    It behaves like a regular AoE, so you can just pick every enemy unit in an X radius around your hero and deal damage.

    If you're worried about dealing damage when projectiles hit the target, you could calculate the distance between the caster and the target and divide it by the projectile speed, but that's very superfluous.
     
  5. GhostHunter123

    GhostHunter123

    Joined:
    Oct 17, 2012
    Messages:
    458
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Use a DDS to detect spell damage and manipulate the damage however you see fit.
     
  6. Zepher

    Zepher

    Joined:
    May 14, 2019
    Messages:
    263
    Resources:
    0
    Resources:
    0
    Think it would be easier to use it as a dummy ability and set the damage to 0 then use a trigger to damage all the enemies based on agility.

    Fan of knives can be the dummy ability if u want to make it seem like the projectile is comming from the casting unit.
     
  7. Cespie

    Cespie

    Joined:
    May 21, 2019
    Messages:
    435
    Resources:
    0
    Resources:
    0
    You can make a generic "Takes damage" event using unit groups. Simply add the units that you wanna damage, and generate a "takes damage" event in the trigger that does the Fan of Knives damage. Then deal the extra damage to any unit taking damage from Fan of Knives based on the casting units agility.
     
  8. Devalut

    Devalut

    Joined:
    Feb 9, 2009
    Messages:
    1,096
    Resources:
    2
    Spells:
    2
    Resources:
    2
  9. GrandMaitre

    GrandMaitre

    Joined:
    Feb 20, 2014
    Messages:
    403
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I made a simple version but it killed me...
    What's wrong ? It is supposed to kill ennemy units.

    • Unit - A unit Starts to cast an ability
    • Conditions
      • (Ability being cast) Equal to Fan of Knives
    • Actions
      • Set agilityE = (Agility of (Triggering unit) (Inclure bonuses))
      • Set agility = (Real(agilityE))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Fan of Knives (GOT) for (Triggering unit)) Equal à 1
        • Alors - Actions
          • Groupe unité - Pick every unit in (Units within 400.00 of (Position of (Triggering unit)) matching (((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal à TRUE)) and do (Actions)
            • Boucle - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (100000.00 + (agility x 1.00)) damage of attack type Sorts and damage type Universel
        • Sinon - Actions
     
  10. Devalut

    Devalut

    Joined:
    Feb 9, 2009
    Messages:
    1,096
    Resources:
    2
    Spells:
    2
    Resources:
    2
    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
     
  11. GrandMaitre

    GrandMaitre

    Joined:
    Feb 20, 2014
    Messages:
    403
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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?
     
  12. Cespie

    Cespie

    Joined:
    May 21, 2019
    Messages:
    435
    Resources:
    0
    Resources:
    0
    This trigger should only kill 1 target. What you are doing in your "pick every unit" loop is going through every unit, 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.

    • 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


    Something like this should work. There may be a formatting issue as I text edited it though.
     
    Last edited: Jun 3, 2019
  13. GrandMaitre

    GrandMaitre

    Joined:
    Feb 20, 2014
    Messages:
    403
    Resources:
    1
    Maps:
    1
    Resources:
    1
    It works thank you very much :)
     
  14. Cespie

    Cespie

    Joined:
    May 21, 2019
    Messages:
    435
    Resources:
    0
    Resources:
    0
    Glad to hear. :)
    +rep would be neat. :D