• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Cast Mass/Multiple/AoE Bloodlust spells

Status
Not open for further replies.
Level 3
Joined
Jul 18, 2010
Messages
26
Good evening everyone

Lately i've been working a bit on my own MC map in the wc3 editor. so far i've been able to solve most of my problems with triggers from looking in other maps and getting a lot of help from hiveworkshop. However i've once again stumbled upon a trigger in which i'm not quite sure how to set up.

What i'm looking for is a trigger to make the bloodlust spell in wc3 apply itself to 5 people at once instead of only affecting the caster, much like the wow version. Been trying some different things but so far they have all been in vain.

I greatly appreciate any help i can get on this matter.

All the best regards
-Fera
 
It isn't quite complicated after all ;)
Base your spell or proper made channel spell or any other No target-spell type ability (abilities that require no target).

  • main
    • Events
      • Unit - A Unit Starts effect of ability
    • Conditions
      • (Ability being cast) Equal to <yourability>
    • Actions
      • Set tempp = (Position of (Triggering unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in 300 range of tempp matching (<here conditions, choose what you like, don't forgot that it's buff for alliances>))
        • Loop - Actions
          • Set tempp2 = (Position of (Picked unit))
          • Unit - Create 1 dummy at tempp2 for (Triggering player) facing Default building facing degrees
          • Unit - Add 0.50 seconds Generic expiration timer to (Last created unit)
          • Unit - Add Blood Lust to (Last created unit)
          • Unit - Order (Last created unit) to Orc: Shaman - Blood Lust (Picked unit)
          • Custom script: call RemoveLocation(udg_tempp2)
      • Custom script: call RemoveLocation(udg_tempp)
Customize area of effect (I used 300) and remake properly Blood Lust for dummies (remove mana cost ect.).

Note: If you dont know whats dummy and how to make dummy unit properly feel free to ask.
Note: If you dont know whats those custom script are here for feel free to ask.
 
Last edited:
Level 3
Joined
Jul 18, 2010
Messages
26
Good Evening

i'm afraid i'm not that advantage in the use of triggers yet, i've mostly just grasped the basis of the basis yet, so if you would take the time to explain/show to use those kind of things i would appreciate it

Kindest regards
-Fera
 
Just follow the trigger, but since you're request is for 5 units, do this...

  • Set tempp = (Position of (Triggering unit))
  • Custom script: set bj_wantDestroyGroup = true
  • Set integer = 0
  • Unit Group - Pick every unit in (Units in 300 range of tempp matching (<here conditions, choose what you like, don't forgot that it's buff for alliances>))
    • Loop - Actions
      • if integer less than 5 then
        • Set integer = integer + 1
        • Set tempp2 = (Position of (Picked unit))
        • Unit - Create 1 dummy at tempp2 for (Triggering player) facing Default building facing degrees
        • Unit - Add 0.50 seconds Generic expiration timer to (Last created unit)
        • Unit - Add Blood Lust to (Last created unit)
        • Unit - Order (Last created unit) to Orc: Shaman - Blood Lust (Picked unit)
        • Custom script: call RemoveLocation(udg_tempp2)
        • Custom script: call RemoveLocation(udg_tempp2)
      • endif
    • Custom script: call RemoveLocation(udg_tempp2)
 
Just follow the trigger, but since you're request is for 5 units, do this...

If/endif is not needed since if we stick to GUI there is already function for that :S
  • Set tempp = (Position of (Triggering unit))
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Random 5 Units from (Units in 300 range of tempp matching (<here conditions, choose what you like, don't forgot that it's buff for alliances>)))
    • Loop - Actions
      • Set tempp2 = (Position of (Picked unit))
      • Unit - Create 1 dummy at tempp2 for (Triggering player) facing Default building facing degrees
      • Unit - Add 0.50 seconds Generic expiration timer to (Last created unit)
      • Unit - Add Blood Lust to (Last created unit)
      • Unit - Order (Last created unit) to Orc: Shaman - Blood Lust (Picked unit)
      • Custom script: call RemoveLocation(udg_tempp2)
    • Custom script: call RemoveLocation(udg_tempp)
@Feralon Explanation step by step:

What we going to create is AoE blood lust yes? So practicaly it means that we are going to create 1 dummy shaman with blood lust for each unit in AoE and order him to cast given spell on selected target.
At first we need to 'find' those units - let's say we found 5. So, our spell will summon 5 'shamans' who will instantly cast blood lust and.. disappear. Yes, disappear since we do not want them to do anything else.

  • Set tempp2 = (Position of (Picked unit))
  • Unit - Create 1 dummy at tempp2 for (Triggering player) facing Default building facing degrees
  • Unit - Add 0.50 seconds Generic expiration timer to (Last created unit)
This part show what I have mentioned: Creating dummy unit (dummy is just temporary unit that is unplayable for player) and adds to each summon timed life in form of expiration timer - like any normaly summoned (kind of elemental) has. We set position where we want each shaman to be created at for later leak removal.

  • Unit - Add Blood Lust to (Last created unit)
  • Unit - Order (Last created unit) to Orc: Shaman - Blood Lust (Picked unit)
^Speaks about adding our given ability and ordering every created 'shaman' to cast it on it's target. It's target. What does it mean here? Let's go to the begining.

  • Set tempp = (Position of (Triggering unit))
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units in 300 range of tempp matching (<here conditions, choose what you like, don't forgot that it's buff for alliances>)) Loop - Actions
Custom script is a freehand. It's kind of action (found at the top of action list) that allow user to write custom jass code. Warcraft3 spells/system are written in jass - you can right-click any trigger you got in your map and select 'Convert to custom text'. It's jass, but now thats too early for you to learn it.
However, about script I have written (just to inform you what is does): this script removes group leak and works somewhat like: 'immidiately remove next created group' - thus we do not need any group unit variable and further more you do not have to destroy it manualy afterwards, it's great, isn't it?

Action - Pick every unit (...) - pick - as said - every unit is created group and do portion of action written below 'Loop - Actions'. That means that fucntion repeats those X times where X is the number of units in given group.
Variable 'tempp' is here - again like in previous part - to set position for later leaks clearing.
Last thing you have to know from this part is that you can refer to each 'picked unit' via (Picked unit) reference.

  • Custom script: call RemoveLocation(udg_tempp2)
  • Custom script: call RemoveLocation(udg_tempp2)
Ha! At last I will show how to remove leaks and why I had been writting about setting point to variable for later removal. Unfortunately you are forced you write custom script - that is writing the part of code by yourself . I do remove those location to free up memory making your spell lagless and bugfree. Group custom script is here for the same purpose.

Note: It would be great to add condition that checks if created unit group is empty or not. If it is empty, prevent the actions since it's pointless.
Your next lecture.
 
Spinnaker said:
If/endif is not needed since if we stick to GUI there is already function for that :S
Surely, it's faster. However, if our buddy has problems with simple trigger - he needs time to understand whats going around therefore using:
  • Custom script: if <condition> then
  • <actions>
  • Custom script: endif
Won't help him much but he probably will be even more confused.
 
Level 3
Joined
Jul 18, 2010
Messages
26
Good evening

First off i'll like to apologize for not being very active on this topic lately, some other things have been going on and it became second priority. back on topic, i am indeed still very new to triggers so custon scripts is still like another world to me, but based on all the help i've got on this thread i'll try to work it out and see if i can create some results.

i'll hear of me when i've given it a go to see if i can figure it out, and while i'm at it i'll like to thank all the people who takes the time to help me out i sincerely appreciate your help, Thank you.

best regards
-Fera
 
Level 7
Joined
May 15, 2009
Messages
192
If you want to do a Mass Bloodlust spell for example, you have to use dummy units and (Pick Every Unit withing Range of Casting Unit matching Conditions) actions. However a spell much like yours can easily be made without triggers, however this will affect all targets in an area of effect, like earthquake.

Simply use the Silence spell, it can modify many more things than spell casting, for example Movement and Attack speed. So, to do a Bloodlust on everyone in AoE, simply have a Bloodlust Buff added and have the spell modify movement speed.

Although its not exactly what you asked, this can be done without triggers and is quite similar.
 
Status
Not open for further replies.
Top