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. Ride into the sunset with the 32nd Modeling Contest. The contest is optionally paired. Best of luck, people!
    Dismiss Notice
  4. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  5. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  6. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  7. 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.

any way to change the attack range?

Discussion in 'World Editor Help Zone' started by alexmantor, Feb 20, 2013.

  1. alexmantor

    alexmantor

    Joined:
    Jul 26, 2010
    Messages:
    166
    Resources:
    0
    Resources:
    0
    Im trying to make a custom "great avatar" ability. The casting unit has 700 attack range but I want it to change to 200 when it cast great avatar. Any way to do it?
     
  2. Xonok

    Xonok

    Joined:
    Mar 27, 2012
    Messages:
    3,042
    Resources:
    8
    Spells:
    3
    Tutorials:
    5
    Resources:
    8
    Range cannot be modified directly as far as I know, but there is a GUI function for changing acquisition range, which gives the same result. I guess you can use that.
     
  3. alexmantor

    alexmantor

    Joined:
    Jul 26, 2010
    Messages:
    166
    Resources:
    0
    Resources:
    0
    which one?
     
  4. Xonok

    Xonok

    Joined:
    Mar 27, 2012
    Messages:
    3,042
    Resources:
    8
    Spells:
    3
    Tutorials:
    5
    Resources:
    8
    • Unit - Set (Picked unit) acquisition range to 200.00

    Code (vJASS):
    SetUnitAcquireRange( GetEnumUnit(), 200.00 )


    Listed the JASS alternative too, in case it makes a difference.
     
  5. alexmantor

    alexmantor

    Joined:
    Jul 26, 2010
    Messages:
    166
    Resources:
    0
    Resources:
    0
    the unit still attack at long range :/... any other idea?
     
  6. SeriousEnemy

    SeriousEnemy

    Joined:
    Nov 15, 2009
    Messages:
    219
    Resources:
    2
    Maps:
    1
    Template:
    1
    Resources:
    2
    Use upgrades.
    Copy and paste the human 'Flying Machine Bombs' upgrade and level 1 enables attack 1 and level 2 enables attack 2.

    Now go to your unit, give the upgrade to the unit and change attack 2 to your needs.
    Disable both attacks.
    Go to Scenario -> Upgrade properties -> click on: 'Select all players'
    -> YOURUPGRADE (level 1) Researched
    -> YOURUPGRADE (level 2) Available

    Now if you cast your spell, you will need a trigger.
    Something like this:
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YOURSPELL
    • Actions
      • Player - Set the current research level of YOURUPGRADE to 2 for (Triggering player)
      • Wait DURATION seconds
      • Player - Set the current research level of YOURUPGRADE to 1 for (Triggering player)

    Anything BIG should be changed of course.. ^^
     
  7. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,752
    Resources:
    0
    Resources:
    0
    You cannot de-level upgrades
     
  8. alexmantor

    alexmantor

    Joined:
    Jul 26, 2010
    Messages:
    166
    Resources:
    0
    Resources:
    0
    crap... then how I set the unit range back to normal?
     
  9. SeriousEnemy

    SeriousEnemy

    Joined:
    Nov 15, 2009
    Messages:
    219
    Resources:
    2
    Maps:
    1
    Template:
    1
    Resources:
    2
    Never tried it, but tested and .. damnit..

    Well then just use a morph spell, change the unit to another one.. -,-'
     
  10. AnarhistHristov

    AnarhistHristov

    Joined:
    Sep 5, 2012
    Messages:
    6
    Resources:
    0
    Resources:
    0
    Unit - Set (Triggering unit) acquisition range to 200.00
     
  11. alexmantor

    alexmantor

    Joined:
    Jul 26, 2010
    Messages:
    166
    Resources:
    0
    Resources:
    0
    could u tell me how?, cuz if I replace the unit with another one and the units is an hero, the stats will be set to lvl 1 and stuff I think...
     
  12. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,752
    Resources:
    0
    Resources:
    0
    u have to use bear form to switch the heroes
     
  13. Ender

    Ender

    Joined:
    Jan 28, 2012
    Messages:
    208
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    for changing the hero to increase its range read this tutorial