- Joined
- Jan 19, 2012
- Messages
- 52
How to create a level-up system
Why create a level-up system?
A level-up system would let non-heroes level up. It is very useful to make units stronger after every kill. It allows you to let the player create "veterans", who are units who deal higher damage due to the unit's experience in combat. Popular maps who use this system include YouTD (towers) and Werewolf: Transylvania (non-hero veteran bonus).
So how do I make it?
First, you need to create a hashtable.
If you feel like it, you can turn the system into a "kill X for rank" system, by adding these few lines to the end of the trigger.
Also, add these lines to the end of Hashtable Creation.
You can use it for a variety of things, like increasing the damage of a unit for every level or rank he has, or increasing the spell potency, or simply adding more abilities. Just use this segment of a line to load levels,
Why create a level-up system?
A level-up system would let non-heroes level up. It is very useful to make units stronger after every kill. It allows you to let the player create "veterans", who are units who deal higher damage due to the unit's experience in combat. Popular maps who use this system include YouTD (towers) and Werewolf: Transylvania (non-hero veteran bonus).
So how do I make it?
First, you need to create a hashtable.
-
Hashtable Creation
-
Events
- Map initialization
- Conditions
-
Actions
- Hashtable - Create a hashtable
- Set Level = (Last created hashtable)
-
Events
-
Level Up System
-
Events
- Unit - A unit Dies
- Conditions
-
Actions
- Hashtable - Save ((Load (Key (Killing unit)) of 1 from Level) + 1) as (Key (Killing unit)) of 1 in Level
-
Events
If you feel like it, you can turn the system into a "kill X for rank" system, by adding these few lines to the end of the trigger.
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key (Killing unit)) of 1 from Level) Equal to 50
-
Then - Actions
- Hashtable - Save 5 as (Key (Killing unit)) of 1 in Rank
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key (Killing unit)) of 1 from Level) Equal to 29
-
Then - Actions
- Hashtable - Save 4 as (Key (Killing unit)) of 1 in Rank
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key (Killing unit)) of 1 from Level) Equal to 28
-
Then - Actions
- Hashtable - Save 3 as (Key (Killing unit)) of 1 in Rank
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key (Killing unit)) of 1 from Level) Equal to 3
-
Then - Actions
- Hashtable - Save 2 as (Key (Killing unit)) of 1 in Rank
-
Else - Actions
- -------- etc... --------
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
Also, add these lines to the end of Hashtable Creation.
- Hashtable - Create a hashtable
- Set Rank = (Last created hashtable)
-
Level Up System
-
Events
- Unit - A unit Dies
- Conditions
-
Actions
- Hashtable - Save ((Load (Key (Killing unit)) of 1 from Level) + 1) as (Key (Killing unit)) of 1 in Level
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key (Killing unit)) of 1 from Level) Equal to 50
-
Then - Actions
- Hashtable - Save 5 as (Key (Killing unit)) of 1 in Rank
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key (Killing unit)) of 1 from Level) Equal to 29
-
Then - Actions
- Hashtable - Save 4 as (Key (Killing unit)) of 1 in Rank
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key (Killing unit)) of 1 from Level) Equal to 28
-
Then - Actions
- Hashtable - Save 3 as (Key (Killing unit)) of 1 in Rank
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load (Key (Killing unit)) of 1 from Level) Equal to 3
-
Then - Actions
- Hashtable - Save 2 as (Key (Killing unit)) of 1 in Rank
-
Else - Actions
- -------- etc... --------
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Events
You can use it for a variety of things, like increasing the damage of a unit for every level or rank he has, or increasing the spell potency, or simply adding more abilities. Just use this segment of a line to load levels,
- ((Load (key([INSERT UNIT HERE])))) of 1 from Level)
- ((Load (key([INSERT UNIT HERE])))) of 1 from Rank)
Attachments
Last edited: