Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

disable attacks?

Discussion in 'Map Development' started by Shamanruler, Sep 20, 2005.

  1. Shamanruler

    Shamanruler

    Joined:
    Mar 29, 2004
    Messages:
    224
    Resources:
    1
    Maps:
    1
    Resources:
    1
    hey, i need some triggering help!
    i want to make it so when a unit is invisible, (permanent invisibilty, to be precise) it does not attack when a unit when it comes in range...similar to windwalk, where the bm is invisible, but does not attack anything in range. Anyone know how to do this?
     
  2. qwerty

    qwerty

    Joined:
    Jul 2, 2004
    Messages:
    695
    Resources:
    0
    Resources:
    0
    i think its a warcraft thing. because wind walk gives a buff but permanent invisibility doesnt.
     
  3. Sunny_D

    Sunny_D

    Joined:
    Sep 17, 2005
    Messages:
    277
    Resources:
    0
    Resources:
    0
    hm... the solution might be that u use a triggers and set the aquisition range of the unit to 0.

    something like:

    Code (Text):
    EVENT:  Unit - a unit beginns casting an ability [your invisibility]

    COND: - casting unit is ..... [the units u want to change]
                 - ability being cast equal to [your invisibility]

    ACTION:  unit - set acquisition range of casting unit to 0
    EDITED:
    or simply: if its permanent as u said - just set the acuisition range of the unit to 0 in object editor.

    Try it - i never did - hope this helps you ^^
     
  4. Shamanruler

    Shamanruler

    Joined:
    Mar 29, 2004
    Messages:
    224
    Resources:
    1
    Maps:
    1
    Resources:
    1
    it didnt work...suprisingly enough
    is this even possible?
     
  5. Sunny_D

    Sunny_D

    Joined:
    Sep 17, 2005
    Messages:
    277
    Resources:
    0
    Resources:
    0
    hm... then you could try this:

    you can copy your unit which becomes invisible in
    object editor (to distingish them do another editor
    prefix) and this copied unit gets no attacks (disable
    both). And then kinda that:

    Code (Text):
    Unit - A unit Begins casting an ability
    (Ability being cast) Equal to *your invisibility*
    Unit - Replace (Casting unit) with a *copied unit* using The old unit's life and mana
    But this only works if u have no triggers or vars on the old unit....

    Another idea:

    Perhaps u can create a new spell based on windwalk
    only with 0 in duration (for endless dur)....

    hm, if this doesnt work, i have no other ideas yet :(

    OH and btw if u know sth about save triggers... watch
    this topic plz :!:
    http://www.wc3sear.ch/viewtopic.php?p=90408#90408
     
  6. Shamanruler

    Shamanruler

    Joined:
    Mar 29, 2004
    Messages:
    224
    Resources:
    1
    Maps:
    1
    Resources:
    1
    the endless duration trick works!
    and if i want to have the unit to become visible i can just remove the buff!
    thanks sunny d, you saved my ass =)