• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help! My AoE ability kills me

Status
Not open for further replies.
Level 6
Joined
Aug 31, 2018
Messages
157
I tried to make blink ability which damages all enemies near the target location of the blink, but everytime i use it, it kills me.

P.S i want to make the ability to deal 20% of my maximum/currect mana, but not sure how to do it.

upload_2019-11-26_11-30-51.png
 
Level 8
Joined
May 21, 2019
Messages
435
I tried to make blink ability which damages all enemies near the target location of the blink, but everytime i use it, it kills me.

P.S i want to make the ability to deal 20% of my maximum/currect mana, but not sure how to do it.

View attachment 338265
First off… what the other two said. Both are quite important.
Second off, if this really is "Blink" being cast, then I'd be cautious about whether this takes the position before or after moving. You may want to go with "Finishes casting a spell" as your event instead.
As for what you asked about:
  • You set up a tempGroup but forgot to use it in the "pick every unit in group" action.
  • You can access the mana of the unit just like you did with the intelligence. I think it may be an integer though, so you have to first select the thing that's called something like "Conversion - Convert Integer to Real", and then you'll find it under "Unit Property - Max mana" or something like that.
 
Level 6
Joined
Aug 31, 2018
Messages
157
@Pyrogasm
It doesn't work, i think it doesn't even deal damage. Why?

  • Aoe Teleport Copy Copy Copy
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set Temp_Group = (Units within 150.00 of TempPoint matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_Temp_Group)
      • Unit Group - Pick every unit in (Units within 300.00 of (Position of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x (3.00 + ((Real((Max Mana of (Triggering unit)))) / 100.00))) damage of attack type Spells and damage type Normal
 
Last edited:
It doesn't work, i think it doesn't even deal damage. Why?
@Tasyen already told you, you're not looping the Temp_Group unit group. You need to do this:

  • Unit Group - Pick every unit in Temp_Group and do (Actions)
    • Loop - Actions
Also you need to move the group destroy script below the loop.
 
Level 6
Joined
Aug 31, 2018
Messages
157
@Pyrogasm @Uncle @Anachron
It still doesn't work
  • Aoe Teleport Copy Copy Copy Copy
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set Temp_Group = (Units within 150.00 of TempPoint matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Max Mana of (Triggering unit)))) + 100.00) damage of attack type Spells and damage type Normal
            • Custom script: call RemoveLocation(udg_TempPoint)
            • Custom script: call DestroyGroup(udg_Temp_Group)
 
Last edited:
Level 6
Joined
Aug 31, 2018
Messages
157
Put the removelocation below set temp_group

The Destroygroup should be outside the Loop and below it.
It still doesn't work. Even if the call removelocation is between both set tempPoints

  • Aoe Teleport Copy Copy Copy Copy
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set Temp_Group = (Units within 150.00 of TempPoint matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Custom script: call DestroyGroup(udg_Temp_Group)
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Max Mana of (Triggering unit)))) + 100.00) damage of attack type Spells and damage type Normal
 
This works fine for me:

  • Stuff
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempGroup = (Units within 500.00 of TempLoc matching ((Matching unit) Not equal to (Triggering unit)))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call RemoveLocation (udg_TempLoc)
      • Custom script: call DestroyGroup (udg_TempGroup)
It doesn't do the same as yours but follows the same logic. I just didn't bother to make it 100% identical.
 
Level 6
Joined
Aug 31, 2018
Messages
157
Holy shit, are you trolling? I even posted an example that you can follow!
Still no.
  • Aoe Teleport Copy Copy Copy Copy Copy
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set Temp_Group = (Units within 500.00 of TempPoint matching ((Matching unit) Not equal to (Triggering unit)))
      • Set Temp_Group = (Units within 500.00 of TempPoint matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Max Mana of (Triggering unit)))) + 100.00) damage of attack type Spells and damage type Normal
            • Custom script: call RemoveLocation(udg_TempPoint)
            • Custom script: call DestroyGroup(udg_Temp_Group)
Btw why Picked unit? Why Picked, when to use it and why?
 
Last edited:
Nope.
  • Aoe Teleport Copy Copy Copy Copy Copy
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set Temp_Group = (Units within 500.00 of TempPoint matching ((Matching unit) Not equal to (Triggering unit)))
      • Set Temp_Group = (Units within 500.00 of TempPoint matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Max Mana of (Triggering unit)))) + 100.00) damage of attack type Spells and damage type Normal
            • Custom script: call RemoveLocation(udg_TempPoint)
            • Custom script: call DestroyGroup(udg_Temp_Group)
You're repeatedly doing the thing everyone is telling you NOT to do.

download-png.338343


In the screenshot you can see the explanations. Don't set Temp_Group two times in a row without running DestroyGroup. It will cause a leak. Set Temp_Group ONE TIME only, then perform the loop (see screenshot). Then when you are DONE with the loop you run the DestroyGroup as shown in THIS PICTURE:
download-1-png.338345
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,509
^To further clarify. Minimize the Action "Pick every unit", then add the "custom script" Actions BELOW it. Those shouldn't be inside of your "Pick every unit" Action.

And the reason you use PICKED unit is because you "PICK every unit in the group".

Just like how when a unit casts an ability it is the CASTING unit and the target of that ability is the TARGET UNIT OF ABILITY BEING CAST. Or when a unit dies you can refer to it as the DYING unit and the killer as KILLING unit. TRIGGERING unit can also be used in most cases to refer to whichever unit fired the Event. So in this case TRIGGERING unit is the same exact thing as the CASTING unit.
 
Last edited:
Level 6
Joined
Aug 31, 2018
Messages
157
You're repeatedly doing the thing everyone is telling you NOT to do.

download-png.338343


In the screenshot you can see the explanations. Don't set Temp_Group two times in a row without running DestroyGroup. It will cause a leak. Set Temp_Group ONE TIME only, then perform the loop (see screenshot). Then when you are DONE with the loop you run the DestroyGroup as shown in THIS PICTURE:
download-1-png.338345
Actually i think it worked all the time, but only if its (a unit starts the effect of an ability) if its (a unit finishes casting an ability, it doesnt work) but the problem with (unit starts the effect of an ability) is that it damages units near the triggering unit before it blink, not after.


  • Aoe Teleport
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set Temp_Group = (Units within 500.00 of TempPoint matching ((Matching unit) Not equal to (Triggering unit)))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Max Mana of (Triggering unit)))) / 10.00) damage of attack type Spells and damage type Normal
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call DestroyGroup(udg_Temp_Group)
 
Actually i think it worked all the time, but only if its (a unit starts the effect of an ability) if its (a unit finishes casting an ability, it doesnt work) but the problem with (unit starts the effect of an ability) is that it damages units near the triggering unit before it blink, not after.


  • Aoe Teleport
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set Temp_Group = (Units within 500.00 of TempPoint matching ((Matching unit) Not equal to (Triggering unit)))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Max Mana of (Triggering unit)))) / 10.00) damage of attack type Spells and damage type Normal
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call DestroyGroup(udg_Temp_Group)
Dude.... I have nothing more to say man. Being this ignorant should be a criminal offense. There is no problem with the event "finishes casting an ability" for blink at all, the problem is your reading skills and ability to comprehend what people are telling you.
 
Level 6
Joined
Aug 31, 2018
Messages
157
Dude.... I have nothing more to say man. Being this ignorant should be a criminal offense. There is no problem with the event "finishes casting an ability" for blink at all, the problem is your reading skills and ability to comprehend what people are telling you.
Dude i made all the triggers the same as yours in the picture that you posted.
Also i am not trolling lol, i am just pretty new into triggers and my english is not that good, so i can't understand 100% of the things that you are sayn, also its my first time, working with Variables and triggers like this one.
 
Status
Not open for further replies.
Top