• 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.

[Spell] Stats based aoe spell?

Status
Not open for further replies.
Level 12
Joined
Mar 24, 2011
Messages
1,082
Edit// Oh, I see now that you are new to the forum, maybe you have no idea what the following thing is ?
//endedit

I do not remember if acid bomb has any Effect over time but this is how you do instant AoE damage with triggers.

This is the basic, although it can be improved a lot.

Event
= Unit - Starts the effect of an ability
Condition
= Ability being cast equal to Acid bomb
Actions
= Set TempPoint = Target point of ability being cast
= Set TempUnitGroup = (Units within 512.00 of TempPoint matching ((Owner of (matching unit)) is enemy of (triggering player))
= Custom script: call RemoveLocation(udg_TempPoint)
= Pick all units in TempUnitGroup and do actions
= = Unit - Cause Triggering unit to damage picked unit dealing (Real((Intelligence of (Triggering unit) (Include bonuses)))) damage of attack type Spells and damage type Normal
= Custom script: call DestroyGroup(udg_TempUnitGroup)
 
Level 4
Joined
Feb 13, 2015
Messages
60
Yes, im very new, and it semms i dont understand well to.

Do you think you could explain to two first actions a bit more complex?
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Ok, so you have went past the first 2 actions so I assume you know what triggers are and why we use them ;) Or not ?

Every trigger has Event - Condition - Actions (Conditions & Event are optional, but lets not go there now)
Pure GUI triggers use something called "Variables", very important, every coder loves them. They are very useful as you can set them to whatever you want/need (A few exceptions...).
When you open the trigger editor, somewhere at the top should be a yellow "X" icon, this is the variable editor, this is how you make global variables.

Set TempPoint = Target point of ability being cast

TempPoint is a point variable which you have to create.
To create the action Right click in actions and create a new action.
From the drop-down menu chose "Set Variable" and set the values accordingly. First you chose the left side of the "=" sign so the editor know what variable you are setting as they can take different values and afterwards you set the right side.

Umm... everything ok so far ? Or I miss-understood the problem ?
 
Level 4
Joined
Feb 13, 2015
Messages
60
I think maybe i have the wrong type of varible, couse i cant se "Event Response - Target Point Of Ability Being Cast".
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
It must look like this:
  • Custom script: call RemoveLocation(udg_PointVariableName)
  • Custom script: call DestroyGroup(udg_UnitGroupVariableName)
Just copy this part "call DestroyGroup(udg_UnitGroupVariableName)" and paste it into the custom script's text field.
Don't forget to changethe "UnitGroupVariableName" after the "udg_" to the name of the variable you have created.

"udg_" must be there and stands for User Defined Global.

These custom scripts will not affect the spell itself but the game. Some actions there create leaks which cause lagg If you think it is too early to go into them you may just delete the, the spell will not lose functionality BUT I strongly suggest to not do so, lagg is bad, leaks are bad, they can make a game unplayable over time. Learn to fix leaks as soon as you can. A spell/map containing leaks can NOT be approved on the hiveworkshop.
To understand why you need these refer to http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Level 4
Joined
Feb 13, 2015
Messages
60
Cant seem to find this part "(Units within 512.00 of TempPoint matching ((Owner of (matching unit)) is enemy of (triggering player))"
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
If you do the thing in my last reply you will see something like
"Units within 512.00 of (Center of (playable map area)) matching Condition"
click the red condition and from the drop-down menu find "Boolean comparison" it should be the deffault.
Then click the first part and find "Unit - Unit Belongs To An Enemy Of Player"

Ah, this should bring you to something like:
(((Matching unit) belongs to an enemy of (Triggering player)) Equal to True))
instead of:
((Owner of (matching unit)) is enemy of (triggering player))
This works as well. Actualy this is what I should have typed to begin with...

PS: You see I have not used the editor in ages, slight errors here and there may occur in my memory :D
 
Level 4
Joined
Feb 13, 2015
Messages
60
cleave copy.png Not working :/
 
Level 14
Joined
Nov 17, 2010
Messages
1,266
You have to pick every unit in tempUnitGroup and then do the action that targets the picked unit. Otherwise there is no picked unit.

So basically you just need to go to Actions -> Unit Group -> Pick Every Unit in Unit Group and Do Multiple Actions. Then just fill in tempUnitGroup as the unit group. Now just put Unit - Cause Triggering Unit to Damage Picked Unit etc, after that action.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Acid Bomb
    • Actions
      • Set TempPoint = (Target point of ability being cast)
      • Set tempUnitGroup = (Units within 512.00 of TempPoint matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to (==) True))
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Unit Group - Pick every unit in tempUnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Real((Strength of (Triggering unit) (Include bonuses)))) damage of attack type Spells and damage type Normal
      • Custom script: call DestroyGroup(udg_tempUnitGroup)
 
Status
Not open for further replies.
Top