1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Need help with a spell

Discussion in 'World Editor Help Zone' started by Tim Tran, Aug 26, 2020.

  1. Tim Tran

    Tim Tran

    Joined:
    Jul 23, 2020
    Messages:
    37
    Resources:
    0
    Resources:
    0
    Hi, I hope my question is at the right place and don't belong to the trigger discussion since I simply wanted to modify a spell to summon a unit. The point is the unit should be there for only one minute (typical for most summoned units, except Archimondes portal), But it should spawn at a point of my choice (similar to Archimondes portal) and the unit should automatically be attacked by surrounding units, while itself being not able to cause damage (like the mirror spell). And the region where I want the unit to appear has to be discovered first (similar to blink-spell of Maiev). Is that possible or do I need to develope such a spell myself? I'm sorry, but so far I just modified what the object editor allows me to do and I have no experience with more complicated programming. So if you have an idea could you please tell me keeping that in mind? Thanks in advance!
     
  2. DoomBlade

    DoomBlade

    Joined:
    Feb 5, 2018
    Messages:
    364
    Resources:
    0
    Resources:
    0
    For the summoned unit you summon, just adjust stats: can flee: false and attacks enabled: none. Or if you want the unit to attack you can just change its damage to 1.

    IF you want to avoid triggers completely, you can add taunt to the summoned and manually order it to cast it.
     
  3. Devalut

    Devalut

    Joined:
    Feb 9, 2009
    Messages:
    1,488
    Resources:
    3
    Spells:
    2
    Tutorials:
    1
    Resources:
    3
    • Example Summon
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • ((Target point of ability being cast) is visible to (Triggering player)) Equal to True
        • (Ability being cast) Equal to Your Spell
      • Actions
        • Set Point[0] = (Target point of ability being cast)
        • Unit - Create 1 Footman for (Triggering player) at Point[0] facing (Facing of (Triggering unit)) degrees
        • Unit - Add classification of Summoned to (Last created unit)
        • Unit - Add a 60.00 second Generic expiration timer to (Last created unit)
        • Custom script: call RemoveLocation(udg_Point[0])


    Note the classification is necessary if you want dispel, purge, and control summon to have their interactions with summons.

    And as @DoomBlade mentioned you can modify the stats of the chosen unit, however, if you have your preferences in the editor set to allow for negative values you can hold (Shift) and modify the unit's base damage to be -1 (along with number of sides & dice being "1") to effectively have 0 damage.

    Also for more advanced take you can try this, but this requires knowledge of dummy units, to which this tutorial I'd highly recommend.
    • Illusions
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • ((Target point of ability being cast) is visible to (Triggering player)) Equal to True
        • (Ability being cast) Equal to Your targeted spell
      • Actions
        • Set Point[0] = (Target point of ability being cast)
        • Set Unit[0] = (Triggering unit)
        • Set Point[1] = (Position of Unit[0])
        • Unit - Create 1 Caster Dummy Unit for (Triggering player) at Point[0] facing (Facing of (Triggering unit)) degrees
        • Set Unit[1] = (Last created unit)
        • Unit - Add item illusions to (Last created unit)
        • Ability - Set Ability: (Unit: Unit[1]'s Ability with Ability Code: item illusions )'s Real Level Field: Area of Effect ('aare') of Level: 0 to (Distance between Point[0] and Point[1])
        • Custom script: call IssueTargetOrderById( udg_Unit[1] , 852274 , udg_Unit[0] )
        • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
        • Custom script: call RemoveLocation(udg_Point[0])
        • Custom script: call RemoveLocation(udg_Point[1])
     
    Last edited: Aug 26, 2020
  4. [db]east

    [db]east

    Joined:
    Feb 27, 2019
    Messages:
    144
    Resources:
    0
    Resources:
    0
    Youll need to know how to use a Dummy Spell/Dummy Ability.

    Perheaps Blink as you mentioned will be good to use for that Dummy Ability since it naturally cant target undiscovered areas. Remove Art - Area Effect and Art - Special, Set Maximum Range to 1.000, Set Minimum Range to 0 and Cast Range as far as it can be cast.

    If you use Blink as the Dummy Ability the first condition in Devaults first trigger is not required.
     
  5. Tim Tran

    Tim Tran

    Joined:
    Jul 23, 2020
    Messages:
    37
    Resources:
    0
    Resources:
    0
    Wow, thanks to all of you for your advice! My best result was to modify Rokhans Greater Serpent Totem,
    but I could still target undiscovered area. So now I have good ideas for the triggers and will try them out.
    Will post my result later...
    Thanks again!
     
  6. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    2,471
    Resources:
    0
    Resources:
    0
    A neat idea that comes to mind is to use Warden's Blink as the base ability, this way you get the "Must target an Explored area" error message when targeting the fog of war.

    Then interrupt the spell cast by pausing/unpausing the caster, preventing it from teleporting to the targeted point.

    The trigger would look like this:
    • Example
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • Ability being cast Equal to YourBlinkAbility
      • Actions
        • Set VariableSet Point = (Target point of ability being cast)
        • Unit - Create 1 SummonUnit for (Triggering player) at Point facing Default building facing degrees
        • Custom script: call RemoveLocation (udg_Point)
        • Unit - Add a 60.00 second Generic expiration timer to (Last created unit)
        • Unit - Order (Last created unit) to Night Elf Mountain Giant - Taunt.
        • Unit - Pause (Triggering unit)
        • Unit - Unpause (Triggering unit)

    And you can order your summoned unit to cast Taunt to aggro the nearby enemies, just make sure it actually has the ability in the first place. Or use the "Pick every unit" function to get nearby enemy units and order them to attack it.
     

    Attached Files:

  7. Tim Tran

    Tim Tran

    Joined:
    Jul 23, 2020
    Messages:
    37
    Resources:
    0
    Resources:
    0
    After some tries some more questions: The triggers work fine, but I have to make my own ability. Now I already uses up
    the silence ability to create an alternative spell which works fine for me, so I want to leave it untouched. Using "blink"
    however makes my hero jump to the target and I don't know how to inactivate the original ability...
    If these abilities can't be inactivated, any idea which basic spell is the best to modify if I want to target a point/area?
    Also my trigger works now only in discovered area and I generated floating text in case the area is undiscovered that
    this has to be done first. However, the spell costs mana (100) and I thought in this case I should give the mana back
    to the triggering unit. However, using arithmetic I can only
    >Set mana of "triggering unit" to ((Percentage mana of ("triggering unit)) + 100)<
    which somehow does not work. How can I change "percentage mana" to the current mana of my triggering unit?
    Or did I miss the possibility to simply "add 100 mana" somewhere? Sorry for asking such probably easy questions,
    but I have not so much experience with triggers and have to figure many things out...
     
  8. Tim Tran

    Tim Tran

    Joined:
    Jul 23, 2020
    Messages:
    37
    Resources:
    0
    Resources:
    0
    Oh, I just realized that meanwhile there was another help advice from Uncle. I will try this now!
    But I still could need some advice how to pay 100 Mana back...
     
  9. DoomBlade

    DoomBlade

    Joined:
    Feb 5, 2018
    Messages:
    364
    Resources:
    0
    Resources:
    0
    This is how you can set mana:

    • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + 100.00)


    Best skill to modify is channel. It does absolutely nothing without triggers, except for effects. You can make it point target. == For your future mapping :)

    In all honesty, trying to make anything or near anything without triggers is just impossible.
     
  10. Tim Tran

    Tim Tran

    Joined:
    Jul 23, 2020
    Messages:
    37
    Resources:
    0
    Resources:
    0
    Update: well, my triggering unit stopped teleporting - Thanks Uncle!
    Unfortunately I can't load your map because of "Level-Info-Data missing or invalid"
    So I have discovered another issue with blink, which does not allow me to extend the
    range of my spell to infinity (even when setting the spell rage to 99999, which worked fine
    with Rokhans Greater Serpent Totem which I replaces with my unit. Works actually best so far
    with the exception that I can target undiscovered regions...
     
  11. Tim Tran

    Tim Tran

    Joined:
    Jul 23, 2020
    Messages:
    37
    Resources:
    0
    Resources:
    0
    To DoomBlade: Actually you are right with the triggers. Those of Devalut are a good example. Just you
    need to know where to find it... So I still don't know how you made your trigger:
    Unit offers two choices: Set mana to value or percentage. I guess it is "value" we need
    Now I have to convert 0.00 into a function and now I'm lost: I find only: "Unit - Percentage Mana"
    and stucked there before, even when using "arithmetic", because I don't know how to change the first "1.0"
    You see, it is easy if you know how to handel the triggers, but for me it is still challeging (but willing to learn
    of course). So PLEASE tell me your trick and where to find the correct expression...
     
  12. DoomBlade

    DoomBlade

    Joined:
    Feb 5, 2018
    Messages:
    364
    Resources:
    0
    Resources:
    0
    Alright so:
    1) In your trigger new action
    2) Use the search to find unit mana
    3) How to create the trigger

    You pick the set mana of unit (not the percentage one)
    Then you create it set mana of (your unit) to value arithmetic.

    Click the 1.0 and change it to unit - property mana of unit
    Click the second 1.0 and change it to 100

    You always have to plus the mana of unit with mana of unit + value, or it will simply set it's mana to incorrect value.

    Hope this helps! :)
     
  13. Tim Tran

    Tim Tran

    Joined:
    Jul 23, 2020
    Messages:
    37
    Resources:
    0
    Resources:
    0
    Property! That's it! And it helped a lot! Thanks DoomBlade! Already learned a lot today. Hopefully there will be some comments how to inactivate the original function of spells as well. I'd like to know if it is possible to set the summoned unit # to zero, so I can use triggers instead. I start to love triggers!!!
     
  14. DoomBlade

    DoomBlade

    Joined:
    Feb 5, 2018
    Messages:
    364
    Resources:
    0
    Resources:
    0
  15. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    2,471
    Resources:
    0
    Resources:
    0
    Did you adjust the maximum range field? See the attached picture.

    Also, if you hold shift while clicking (opening) a value you can edit it beyond the normal limitations. This also allows for negative values, such as giving Devotion Aura a negative armor bonus so it reduces armor instead of adding it (useful for negative enemy auras). Make sure that these settings are enabled, see my "settings" picture.
     

    Attached Files:

    Last edited: Aug 27, 2020
  16. Tim Tran

    Tim Tran

    Joined:
    Jul 23, 2020
    Messages:
    37
    Resources:
    0
    Resources:
    0
    Hi Uncle, help again needed. I managed to extend the range of my spell (based on blink) as
    [db]east suggested and now suddenly my trigger is triggered so often, that there
    are hundreds of my unit. I could stop this by setting the duration of Hero and normal
    to zero, but then my casting unit is suddenly located at the map center! I guess there
    must be simply some time passing by so the pause / unpause triggers of uncle can work.
    Also the trigger of DoomBlade to add 100 Mana does not work (either with "triggering unit"
    or "casting unit"). But when I trigger "remove casting unit", it works...
     
  17. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    2,471
    Resources:
    0
    Resources:
    0
    Perhaps it's because you're on a different version than me but if you trigger it exactly like my example trigger then I really think it should work.

    Can you post your triggers? How To Post Your Trigger
     
  18. DoomBlade

    DoomBlade

    Joined:
    Feb 5, 2018
    Messages:
    364
    Resources:
    0
    Resources:
    0
    Can you paste your triggers here? In the trigger editor right click the trigger name. Choose "copy as text"

    Then write [.Trigger] Paste text here [/.Trigger] Without the dots.
     
  19. Tim Tran

    Tim Tran

    Joined:
    Jul 23, 2020
    Messages:
    37
    Resources:
    0
    Resources:
    0
    Hi Uncle, well it is not completely sam as your, but have a look: upload_2020-8-27_18-50-44.png
    I don't need Taunt anymore since I add that to my unit a standard ability and the computer happily attacks it...
    The sounds I often use a control for me (and for fun) and it is played twice when all the units appear...
     
  20. Tim Tran

    Tim Tran

    Joined:
    Jul 23, 2020
    Messages:
    37
    Resources:
    0
    Resources:
    0
    And I will do my best to post my triggers properly next time. Sorry.