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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  4. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  5. 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.

Attribute based AoE skills? Need help!

Discussion in 'World Editor Help Zone' started by thanhtran2, Aug 24, 2012.

  1. thanhtran2

    thanhtran2

    Joined:
    Aug 24, 2012
    Messages:
    8
    Resources:
    0
    Resources:
    0
    As the title, I have problems while creating spells which deal damage based on Hero's attributes. I know how to creating single target spells but not AoE targets spells.

    For example, I want to create a custom Thunder Clap spell which deals damage equal to 5 x the caster's Strength to enemy units in a 500 AoE.

    Can somebody help me with the trigger in GUI?

    I'm a newbie here!

    Thanks in advance! :wink:
     
  2. rulerofiron99

    rulerofiron99

    Joined:
    Jul 10, 2006
    Messages:
    3,129
    Resources:
    14
    Maps:
    4
    Spells:
    9
    Tutorials:
    1
    Resources:
    14
    • AoeDamage
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Thunder Clap
      • Actions
        • Set x = (Real(((Strength of (Triggering unit) (Exclude bonuses)) x 4)))
        • Set tempPoint = (Position of (Triggering unit))
        • Set tempUnitGroup = (Units within 250.00 of tempPoint matching (((Owner of (Triggering unit)) is an enemy of (Owner of (Matching unit))) Equal to True))
        • Unit Group - Pick every unit in tempUnitGroup and do (Actions)
          • Loop - Actions
            • Unit - Cause (Triggering unit) to damage (Picked unit), dealing x damage of attack type Spells and damage type Normal
        • Custom script: call RemoveLocation(udg_tempPoint)
        • Custom script: call DestroyGroup(udg_tempGroup)


    The only differences between this and a single target spell:
    - use a unit group variable to pick nearby enemies (pick every unit in range matching condition)
    - deal the damage to each unit individually
    - clean your memory leaks!
     
  3. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,979
    Resources:
    17
    Spells:
    17
    Resources:
    17
    You don't have to create a new global variable just for the sake picking every unit, just do this;
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units within 512.00 of tempPoint matching (((Matching unit) belongs to an ally of (Triggering player)) Equal to True)) and do (Actions)
      • Loop - Actions
     
  4. thanhtran2

    thanhtran2

    Joined:
    Aug 24, 2012
    Messages:
    8
    Resources:
    0
    Resources:
    0
    Thanks both of you for helping me!
    I use trigger given by rulerofiron and it works for me!
    Anyway, I will try defskull's trigger in another skill!
    :)
     
  5. rulerofiron99

    rulerofiron99

    Joined:
    Jul 10, 2006
    Messages:
    3,129
    Resources:
    14
    Maps:
    4
    Spells:
    9
    Tutorials:
    1
    Resources:
    14
    defskull's would probably be better, uses less memory and less lines of code :)
     
  6. Elfansoer

    Elfansoer

    Joined:
    Aug 26, 2012
    Messages:
    122
    Resources:
    0
    Resources:
    0
    Well, based on deffskull, i see (well, actually read) that in ruleonfire's trigger, the var. x can be removed, and use the "defining of var. x" to define the damage it do. Save memory (but it's a long line and long click, though).
     
  7. Chill-out

    Chill-out

    Joined:
    Aug 27, 2012
    Messages:
    25
    Resources:
    0
    Resources:
    0
    I'm trying to do some thing like connection with attributes that will add hp dmg and def to summoned unit compare to summoners attributes. trying to do this way but cant find formula starting on "real" got "load" will that work?
     
  8. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,979
    Resources:
    17
    Spells:
    17
    Resources:
    17
    You already created a thread for this, no need to hijack other people's thread to ask a question that is not related to the main topic of this thread at all.

    Or maybe you see the words "Attributes", you think it's related ?
    No.
    Yours requires a system, advanced one.
     
  9. Chill-out

    Chill-out

    Joined:
    Aug 27, 2012
    Messages:
    25
    Resources:
    0
    Resources:
    0
    I'm sorry, won't happen again.
     
  10. CoLd Bon3

    CoLd Bon3

    Joined:
    Aug 8, 2010
    Messages:
    948
    Resources:
    4
    Spells:
    4
    Resources:
    4
    1. deffskull - i lol'd
    2. ruleonfire - i rofl'd

    RULE ON FIRE. LMAO! :goblin_yeah:
     
  11. rulerofiron99

    rulerofiron99

    Joined:
    Jul 10, 2006
    Messages:
    3,129
    Resources:
    14
    Maps:
    4
    Spells:
    9
    Tutorials:
    1
    Resources:
    14
    Screw you guys! :'(
     
  12. edo494

    edo494

    Joined:
    Apr 16, 2012
    Messages:
    3,846
    Resources:
    5
    Spells:
    1
    JASS:
    4
    Resources:
    5
    thats why I copy names and paste them here :D
    PS: your avatar is nice :D
     
  13. CoLd Bon3

    CoLd Bon3

    Joined:
    Aug 8, 2010
    Messages:
    948
    Resources:
    4
    Spells:
    4
    Resources:
    4
    Me too! :D
    @rulerofiron99, we all know you are DA RULAR OF ALL IRON 99, not a rule of fire, whatever that means...

    Thank god you are not rulerofiron69, this would've scared me.
     
  14. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,979
    Resources:
    17
    Spells:
    17
    Resources:
    17
    I always thought his name was "ruler of fire on 99", screw me.

    SOLVED.
     
  15. rulerofiron99

    rulerofiron99

    Joined:
    Jul 10, 2006
    Messages:
    3,129
    Resources:
    14
    Maps:
    4
    Spells:
    9
    Tutorials:
    1
    Resources:
    14
    Back in the Maps'n'Mods days, I was affectionately referred to as "rulero".
     
  16. Ragon.Slear

    Ragon.Slear

    Joined:
    Aug 19, 2012
    Messages:
    184
    Resources:
    0
    Resources:
    0
    lol, so funny, ruler on fire
     
  17. CoLd Bon3

    CoLd Bon3

    Joined:
    Aug 8, 2010
    Messages:
    948
    Resources:
    4
    Spells:
    4
    Resources:
    4
    I thought he was "rule of iron 99" and after the post of Elfansoer i saw the "r" ("rulerofiron99").
    I also got screwed...
     
  18. rulerofiron99

    rulerofiron99

    Joined:
    Jul 10, 2006
    Messages:
    3,129
    Resources:
    14
    Maps:
    4
    Spells:
    9
    Tutorials:
    1
    Resources:
    14
    Fair enough. It isn't the easiest read username.
     
  19. CoLd Bon3

    CoLd Bon3

    Joined:
    Aug 8, 2010
    Messages:
    948
    Resources:
    4
    Spells:
    4
    Resources:
    4
    I thought of making my username "motherofjesuschrist69" before 2 years.
    Not kidding
    I'm kidding
     
  20. Elfansoer

    Elfansoer

    Joined:
    Aug 26, 2012
    Messages:
    122
    Resources:
    0
    Resources:
    0
    Er... Sorry for the typo...
    (Well, at least, my typo and the one who EXPLAINS it solve the rulerofiron's problem on his nickname....)