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

[Trigger] Add stats per kill trigger?

Status
Not open for further replies.
Level 3
Joined
Feb 10, 2008
Messages
43
How do you get a hero to gain stats for every kill he/she makes?

also, would the trigger I uploaded in this post work for respawn?
 

Attachments

  • Respawntrigger.JPG
    Respawntrigger.JPG
    17.7 KB · Views: 165
Level 2
Joined
Jun 15, 2008
Messages
18
For a stats trigger:
EVENTS - Generic unit events - A unit dies

CONDITIONS - Unit comparison - Killing unit is equal to UNIT

ACTION - Hero - Modify Hero Attributes

Your respawn trigger would not work at all well; for a respawn trigger:
EVENTS - Unit dies

CONDITION - Unit type comparison - Unit type of dying unit is equal to UNIT

ACTION - wait 20 seconds
ACTION - Hero - Revive (instant) - Revive dying unit...
 
Level 2
Joined
Jun 15, 2008
Messages
18
When I tested the trigger, Dying Unit worked fine but GhostWolf is right - using 'Triggering Unit' instead of 'Dying Unit' means the trigger will execute slightly faster, which will make a noticable difference on BNet.

But I just noticed in your thumbnail that you don't seem to be reviving Heroes (you want Heatless soldiers to revive too?) In which case, the Hero respawn trigger won't work anyway.

E - Unit Dies
C - OR (multiple conditions) - Unit type of dying unit is (***fill in whatever unit you want to revive, copy this bit for multiple types of unit***)
A - Wait 2 seconds
- Replace dying unit with unit of type dying unit...
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
The thing is, you cant use dying unit after wait actions.
I assume you tested when only 1 unit died. But if two units die like on the same time... Dying unit will be overwritten from the first dying unit to the second one (dying unit is global)
Triggering unit however is "local", and will always work.
Also... Dying unit is just a redirection from triggering unit. Just like you said, its faster using triggering unit too.
 
Level 3
Joined
Feb 10, 2008
Messages
43
Eh, bashed to death after only a week of triggering. That was for creep respawn, I've got a hero revive system. They die, and revive in a closed off area of the map, where they have to pick up "Your Heart" and use it to be revived in the area that isn't closed off.. Must I explain everything before people stop bashing?
Oh, and thanks for the help, in that backhanded way some of you did it..
 
Level 3
Joined
Feb 10, 2008
Messages
43
That was the most idiotic sentence I heard for some time, thanks for sharing.

Since you want help, you might want to explain what you want, right ? If you think else words, please just leave and never come back.
You're an even bigger ass then I thought, thanks for showing that you can be a bigger ass then anyone else I've met on this forum.
You now fail horribly at helping people, and you should "just leave and never come back"
 
Level 3
Joined
Feb 10, 2008
Messages
43
I'm sorry, I just assumed that asking for a little help wouldn't make people start flaming at me. I'm completely new at this, so I wasn't expecting insta-flame.
I believe there was flaming in the first reply as well..
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
Well, you should put maximum effort into formatting your post and explaining yourself. That way you'll get much better, faster and kinder responses.
You also forgot to use the search function.
You also forgot to take a look at the similiar threads after opening this one.
I know GhostWolf wasn't exactly kind, but I can understand that he gets upset when someone is posting pointless stuff.

You should always ask for help if you don't know something, but spend a few minutes to look around first. Your future questions were most probably asked and answered by someone else before, not to mention tutorials.
 
Level 3
Joined
Feb 10, 2008
Messages
43
With my respawn trigger, I assumed people would read my signature and notice "Revival system works!"
But instead they figured it was a respawn for heroes.
And also, I'm kind of stubborn with how I get help.
Reading tutorials I refuse to do, except as a final resort.
Using other peoples threads for help just before my final resort.
I mean, if there was a model I needed I'd go to other people's threads, but that's because models are harder to make, especially if you're artistically challenged.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
With my respawn trigger, I assumed people would read my signature and notice "Revival system works!"
But instead they figured it was a respawn for heroes.

Never assume. "We do not know what you mean" is what you should always think and therefore explain yourself to the MAX.

And also, I'm kind of stubborn with how I get help.
Reading tutorials I refuse to do, except as a final resort.

Don't you think this is quite stupid ?
Why bother people and wait for answers when you can probably either learn it after 2 minutes of reading a tutorial or by simply trying (which about 99% of the people here don't bother to do) ?

Using other peoples threads for help just before my final resort.
I mean, if there was a model I needed I'd go to other people's threads, but that's because models are harder to make, especially if you're artistically challenged.

Threads ninja ? That's not nice, period.


And this post is for all of you which do exactly the same things. I'm getting annoyed at pointing it out at each thread and getting neg repped for it.
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Why don't you just help him instead of saying he forgot this, he forgot that, he didn't this, he didn't-- come on.

Draxor, right now the trigger runs every 20 seconds or whenever a unit dies (and of course if the conditions are met).
If you want that trigger to work flawlessly, create a Point variable, I named it YourPointVariable in this case. I don't know what are Heartless and Heatless Soldier, but if the trigger doesn't work, try removing those conditions.
  • Heartless
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Heartless is A ground unit) Equal to True
      • (HeatlessSoldier is A ground unit) Equal to True
    • Actions
      • Set YourPointVariable = (Position of (Triggering unit))
      • Wait 5.00 seconds
      • Custom script: call CreateUnit(GetOwningPlayer(GetTriggerUnit()),GetUnitTypeId(GetTriggerUnit()),GetLocationX(udg_YourPointVariable),GetLocationY(udg_YourPointVariable),270)
      • Custom script: call RemoveLocation(udg_YourPointVariable)
I suggest copying the scripts directly. If you have any doubts, do not hesitate in asking ;)

Oh yeah you also asked for a hero gaining stats when killing enemies? Here it is:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
    • Actions
      • Hero - Modify <attribute> of (Killing unit): Add <points>
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
By the way I actually passed through the wait without noticing. I hope you can't kill creeps very fast in your map: if you do, you'd better remove the Waiting action, else you'll have your point variable set to a different location when the creep spawns.

This creep revival system would be best done in JASS ;p
 
Status
Not open for further replies.
Top