- Joined
- Jan 15, 2009
- Messages
- 80
Well the title says it all.. I'll just get right into it.
For this to work you would have to have already set the experience gain to 0%. (In this tutorial you will get experience when a unit controlled by Player 12 (Brown) dies)
First of all make the trigger and name it "Award Experience". After you made the trigger add this event,
After you made that event make this action
After you made this action you will see another action looking thing under the action you just made, right click on it and press "New Action", now make this action
The cool thing about this trigger is that you can easily set the experience you want the hero to get by setting the units level that he is killing..
BONUS: To make it so the owner of the hero gets gold for what ever level the hero is add this action
O.K well.. The tutorial is DONE! If you did it right you are 1 step cooler to having a kick ass map! (sPy helped me with the floating texts when I got stuck)
For this to work you would have to have already set the experience gain to 0%. (In this tutorial you will get experience when a unit controlled by Player 12 (Brown) dies)
First of all make the trigger and name it "Award Experience". After you made the trigger add this event,
-
Events
-
Unit - A unit owned by Player 12 (Brown) Dies
-
-
Actions
-
Unit Group - Pick every unit in (Units within 1000.00 of (Position of (Dying unit))) and do (Actions)
-
-
Actions
-
Unit Group - Pick every unit in (Units within 1000.00 of (Position of (Dying unit))) and do (Actions)
-
Loop - Actions
-
Hero - Add (Level of (Dying unit)) experience to (Picked unit), Show level-up graphics
-
-
-
BONUS: To make it so the owner of the hero gets gold for what ever level the hero is add this action
-
Actions
-
Unit Group - Pick every unit in (Units within 1000.00 of (Position of (Dying unit))) and do (Actions)
-
Loop - Actions
-
Hero - Add (Level of (Dying unit)) experience to (Picked unit, Show level-up graphics
-
Player - Add (Level of (Dying unit)) to (Owner of (Picked unit)) Current gold
-
-
-
EXTRA BONUS: When you are on the main window of World Editor click on the tab at the top labeled "Advanced" then press "Game Interface..."
Now a new window should of opened. Click on the little check box at the top labeled "Use Custom Game Interface", now scroll down until you see the text "Text - General - 'Level %u', double click it and change it to "|cffff00ff+%u Experience|r" then press OK and OK again. (This sets it from where it said the units level to saying "+(How much experience you get) Experience" (And its also in purple, the same color as your experience bar!)
Now a new window should of opened. Click on the little check box at the top labeled "Use Custom Game Interface", now scroll down until you see the text "Text - General - 'Level %u', double click it and change it to "|cffff00ff+%u Experience|r" then press OK and OK again. (This sets it from where it said the units level to saying "+(How much experience you get) Experience" (And its also in purple, the same color as your experience bar!)
EXTRA EXTRA BONUS: This extra, extra bonus will teach you how to add floating text which tells you how much experience you are getting. Add these actions under your last action.
-
Floating Text - Create floating text that reads (+ + ((String((Level of (Dying unit)))) + Experience)) above (Dying unit) with Z offset 0.00, using font size 8.00 (<== The font size is nagotiatable, I like the size 8), color (100.00%, 0.00%, 100.00%), and 0.00% transparency
-
Floating Text - Set the velocity of (Last created floating text to 20.00 towards 90.00 degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
The first action will create the floating text in a purple color, the second action will make the floating text slowly move up, the third action will make the floating text able to eventually dissapear, and the fourth action makes the floating text dissapear in 3.00 seconds.
O.K well.. The tutorial is DONE! If you did it right you are 1 step cooler to having a kick ass map! (sPy helped me with the floating texts when I got stuck)
Last edited: