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

Add damage and armor.

Status
Not open for further replies.
Level 2
Joined
Jun 8, 2014
Messages
15
Hi guys! I would like to know how do I go about doing this trigger:


Say if a unit kills like

5 enemies - +5 damage +1 armour (Adds a 'Rank 1' icon)
10 enemies - +10 damage +2 armour (Removes 'Rank 1', adds 'Rank 2' icon)
15 enemies - +15 damage +3 armour (Removes 'Rank 2', adds 'Rank 3' icon)


As I'm fairly new to the World Editor without background in programming, I would prefer a GUI method. Also, if possible, can I include a counter to show how many kills the unit does?

I viewed Bonus Mod but couldn't understand how do I go about combining the increasing kills with the increasing bonus attributes.

Thank you!!!

EDIT: I've used the GUI Unit Indexer for a trigger. Though I got it working for the trigger, I still don't quite know how to use it. I don't get the UnitIndexEvent 1/2/3 part.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Event 1 = A unit is indexed by the system. When the unit enters the map
Event 2 = When a unit is deindexed. You won't need this.
Event 3 = When the system has initialized, happens right after the map loads. Use this event if you need to do something with a unit index at map initialization. It ensures all units have an index.

You don't need bonus mod necessarily.

A unit dies
Set kills[index of killing unit] = kills[index of killing unit] + 1
if kills[index of killing unit] == 1 then
--give unit damage ability
--give unit armor ability
else
--set level of damage ability to kills[index of killing unit]
--set level of armor ability to kills[index of killing unit]
endif
 
Status
Not open for further replies.
Top