- Joined
- Mar 17, 2008
- Messages
- 150
BOUNTY SYSTEM
What is a Bounty System?
A bounty system occurs when a unit dies and it drops an item. The item is specifically given. Percentage of course.
How do I do this?
If you read this tutorial by me. You'll know all about it
What do I need to do first?
Follow this steps:
VARIABLES
Create an Item Variable Array - Specify what they will drop.
Create an Integer Array - Specify the creep level to determine item.
Easy Triggers:
-
InitializeItemBountySystem
-
Events
- Map initialization
- Conditions
-
Actions
- Set Item[1] = Mask of Death
- Set Item[2] = Kelen's Dagger of Escape
- Set Item[3] = Crown of Kings +5
- -------- What the items are. --------
- Set Creep_Level[1] = 2
- Set Creep_Level[2] = 3
- Set Creep_Level[3] = 6
- -------- Creep level --------
-
Events
That was easy, what will I do next?
Just listen, be patient
THE ITEM DROP
The triggers here are simple. If a unit dies, it will check what level the creep is and it drops the item given at the variable. We too make it drop in a certain rate.
For this part, I used a level 2, 3, and 6 creep.
For level 2, the drop rate is 60%
For level 3, the drop rate is 30%
For level 6, the drop rate is 15%
-
If - Conditions
- (Level of (Dying unit)) Equal to Creep_Level[1]
- (Random integer number between 1 and 100) Less than or equal to 60
The dying unit is specifies as the variable given earlier on...
That's the percentage drop rate. Find that in Conditions, Integer Comparison, Math - Random Number.
-
Then - Actions
- Item - Create Item[1] at (Position of (Dying unit))
Do that to all the levels of the creeps you want..
Final Look:
-
Bounty System
-
Events
- Unit - A unit Dies
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of (Dying unit)) Equal to Creep_Level[1]
- (Random integer number between 1 and 100) Less than or equal to 60
-
Then - Actions
- Item - Create Item[1] at (Position of (Dying unit))
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Random integer number between 1 and 100) Less than or equal to 30
- (Level of (Dying unit)) Equal to Creep_Level[2]
-
Then - Actions
- Item - Create Item[2] at (Position of (Dying unit))
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Random integer number between 1 and 100) Less than or equal to 15
- (Level of (Dying unit)) Equal to Creep_Level[3]
-
Then - Actions
- Item - Create Item[3] at (Position of (Dying unit))
-
Else - Actions
- Do nothing
-
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)
-
Events
Last edited: