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

Agility for kills

Status
Not open for further replies.
Level 4
Joined
Aug 6, 2004
Messages
52
I need to make a skill, which grants X agility, every x amount of kills. Ie. level one.
Every 40 kills, the hero gains +1 agility. what do i do? i tried making this but i think i made it more complicated than it really is.
 
Level 2
Joined
Feb 5, 2005
Messages
19
?

do you want 1 agi for each 40 kills on lvl 1 then 2 agi for 40 kills on lvl 2 or?

if you want the same on all lvls it would be like this:

Event
Unit - A unit Dies

Conditions
(Killing Unit) Equal to (the unit you want to gain agility)

Actions
Set Kills = (Kills + 1)
If/ Then/ Else, Multiple Functions
- If Conditions
Kills Equal to (the amount of kills needed)
- Then Actions
Hero-Modify Agility of (Killing Unit): Add (The
amount of agility you want your hero to get)
Set Kills = 0
- Else Actions
Do Nothing

If this dont work give me the map and ill fix it ok?
 
Level 11
Joined
Aug 15, 2004
Messages
710
try

try using WEU,

trigger 1

event a unit kills a unit
conditions: unit type of killing unit is -----

action: set killing unit's custom value to 40

trigger 2

event perodic event every 1 second

action: pick every unit matching condition unit type of matching unit is -----

add 1 agility to picked hero
set picked unit's custom value to 0
 
Level 1
Joined
Feb 23, 2005
Messages
2
Lumber Based

This Works!!!! (I HAVE TESTED)

This is a Lumber based version of what you want
Make 3 triggers...
Make a Critical ability with (0) in everything
(so the critical dosent work)
___Trigger 1___
[Events]
Unit - A unit Learns a skill
[Conditions]
(Learned Hero Skill)Equal to (name of ability)
((Triggering unit)is A Hero)Equal to True
[Actions]
Trigger - Turn on Trigger 2<gen>
Wait 1.00 seconds
Trigger - Turn off Trigger 2<gen>
------------------------------------------
___Trigger 2___ (this trigger is Instally Off)
[Events]
Player - Player 1 (Red)'s Curret lumber becomes Greater than or Equal to 40.00
[Conditions]
Blank
[Actions]
Hero - Modify Agility of <Unit of your choice>: add 1
Wait 0.10 seconds
Player - Set Player 1 (Red) Curret lumber to 0
-------------------------------------------
___Trigger 3___
[Event]
Unit - A unit Dies
[Conditions]
Blank
[Actions]
Player - Add 1 to (Owner of (Killing unit))Curret lumber

Hopes this works out for you :wink:
 
Level 7
Joined
Jul 30, 2004
Messages
451
fl3h said:
I need to make a skill, which grants X agility, every x amount of kills. Ie. level one.
Every 40 kills, the hero gains +1 agility. what do i do? i tried making this but i think i made it more complicated than it really is.

uh go with alaran's or this, since the other 2 seem to be MUCH more complicated than they have to be

first just have a trigger that turns on this trigger when the hero learns the ability (if multiple instances are needed, add a check to see which unit is doing the killing for referencing instead of filtering it in the conditions)

Code:
Event
a unit dies

Conditions
(killing unit) == 'whatever'
(owner of killing unit) is enemy of (owner of dying unit)
...possibly some other restrictions...

Actions
set nKills = nKills + 1
if (nKills % 40 == 0) then
    modify hero agility of (killing unit) add 1
else
    do nothing
endif

1 variable, 2 triggers
if you need multiple heros doing it just use an array or custom value (or handle variables)

for multiple levels, just have another variable, nInc and increment it each level and instead of adding 1 to agility, add nInc
 
Status
Not open for further replies.
Top