• 🏆 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!

[Trigger] Help with simple GUI spell

Status
Not open for further replies.
Level 6
Joined
May 31, 2008
Messages
218
I am trying to make a really simple spell based on doom. The thing i want to add via triggers is that when the unit dies he damages a small area around him, and i know there is a thing you can use to damage the area around the unit.
But i get lost when i'm choosing options on events and conditions, when i looked at option: unit dies it seems unlogical that i can do anyting to that unit under actions, since it dead. Could any1 give me a hint so i can manage to make this simple thing.
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
  • Melee Initialization
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) has buff Doom) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit)) matching (((Owner of (Picked unit)) is an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
That probably leaks or something, so it would be a good idea to learn about leaks and how to solve them. If you know how to solve leaks already, good for you.
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
To do this, you have to check for a unit that is dying. You also have to designate the unit that has the buff Doom. The only way I can do this in GUI is to run a periodic check for when the unit dies. But I'm unsure of how to create a variable that can fit both slots.
 
Level 12
Joined
Aug 22, 2008
Messages
911
Hm... How about instead of basing that spell on Doom, base it on Incinerate instead, then each second make the Casting Unit damage the targeted unit via triggers? If it applies the buff then this could work.
 
Last edited:
Level 6
Joined
May 31, 2008
Messages
218
Hm... How about instead of basing that spell on Doom, base it on Incinerate instead, then each second make the Casting Unit damage the targeted unit via triggers? If it applies the buff then this could work.

Isn't incinerate a ability that is always active, you don't have to target a unit or anything for it to act?
 
Level 6
Joined
May 31, 2008
Messages
218
Lol, this is just i was doing 2 years ago...simple make a dummy with damage upon death ability, than put that dummy to replace the doom minion, and add duration to 0.01, it worked for me without triggering. =)

meh, so simple xD. i never thought of that even that i knew doom summoned a unit.
 
Last edited:

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
you really simply do it just do that :

Unit start effect of an ability
Abiltitie being cast is equal to doom
SET UNIT = Targeted unit of abilitie being cast

A unit Dies
Dying unit is UNIT
the rest is up too u

REmember to set UNIT = No unit (null that unit)
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Actually, I would imagine a dieing unit would be able to have a buff. As the death event should fire before the unit truely dies but after the death process is initiated.

This is if it uses the same logic as the on damage event which fires after the process is initiated but before the actual damage is delt.

As for the patch topic... Make sure you have the lattest patch installed from battlenet as many of them fixed bugs and added new content to WE.
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
I have patch 1.22.0.6328.
I tested the trigger with a Dying Unit and the buff Doom and it didn't work. So I'm guessing it doesn't check that way.
For the variable, provide me with an example if this 'so-called' variable exists.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Yes but events fire before the actual thing that triggers them occurs. Eg the unit is damaged event fires before the actual damage is dealt. The order evenets fire before the actual order is issued. Thus surly the death event will fire before the unit dies but after its health becomes too low to live.
 
Level 17
Joined
Jan 21, 2007
Messages
2,013
But still it won't work.
I'm not too sure about when the event really happens but i've understood it that unit dies is triggered right after the unit dies. And as Berzerker said, a dead unit can't have a buff.

In the even "A unit is attacked" it triggers right after the attacking unit attacks, not when the attacked unit is hit. There's a clear difference there.
 
Level 17
Joined
Jan 21, 2007
Messages
2,013
Yes but i think there is a maximum limit to arrays.
But one thing occurred to me. If the spell should be like doom it has a duration until the unit dies right?
Then you could add the afflicted unit to a unit group when the spell is casted.
Check every 0.3 seconds of gametime for all dead units in the group.
Create a dummy unit etc. etc.
remove the dead units from the group.
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
if a unit is spawned by doom then u can add a unit is summoned kill summonded unit and damage circulaire area around that unit (coz when unit dies and he is affected by doom a unit will be summoned from him ) u can just kill that summoned unit and damage all circulaire area around it
 
Level 7
Joined
Jul 12, 2008
Messages
295
Events: A unit starts the effects of an ability
Conditions:Ability is being cast equal to (your Doom)
Actions: Set Target = Targeted unit of ability is being cast
If: Target is dead(this is in bolean)
Then: Cause to damage X area(your choice)
Else:
 
Level 17
Joined
Jan 21, 2007
Messages
2,013
if a unit is spawned by doom then u can add a unit is summoned kill summonded unit and damage circulaire area around that unit (coz when unit dies and he is affected by doom a unit will be summoned from him ) u can just kill that summoned unit and damage all circulaire area around it

Yeah, thats a good idea. When you put it that way, i know it can be done without triggers.
 
Status
Not open for further replies.
Top