-
Creep Respawn
-
Events
-
Unit - A unit owned by Neutral Hostile Dies
-
Conditions
-
((Triggering unit) is A Hero) Not equal to True
-
Actions
-
Wait 40.00 seconds
-
If ((Number of units in (Units within 700.00 of (Center of (Rect centered at (Position of (Dying unit)) with size (1.00, 1.00))) matching (((Matching unit) belongs to an enemy of Neutral Hostile) Equal to True))) Equal to 0) then do (Unit - Replace (Dying unit) with a (Random level (Random integer number between 1 and 10) creep unit-type) using The new unit's max life and mana) else do (Trigger - Run (This trigger) (checking conditions))
Why 40 second wait? Because you have to have bones around for the creep to respawn. I do not know why this is. I have upped my bone decay to several minutes to 5 minutes to get extended respawn times.
I set my "bosses" as hero - either through a trigger that creates them or through "Unit - Add classification of A Hero to (Triggering unit)" (Created unit or a selected unit in editor)
If you do not want a random creep then change the random level to:
...(Unit - Replace (Dying unit) with a (Unit-type of (Dying unit)) ...
You can also tie it into the hero or killing units level. Say you want level 2 stuff to drop from level 2 creeps instead of a level 9 item dropping from a level 2 creep because the hero is level 9.
The Rect is from WEU - for region.
In this instance a creep DOES NOT respawn if an enemy to neutral hostile is within a certain range of the dying unit. You can remove that, change the distance what ever.
I'm using WEU so there is the addition of Point- Remove point of (dying unit) and Point-remove point of last created unit.
To remove a leak point for WE check out:
http://www.hiveworkshop.com/forums/showthread.php?t=35124
If you are not too picky about random drops you can make it a relatively simple trigger like:
-
Item Creep Drop
-
Events
-
Conditions
-
(Owner of (Dying unit)) Equal to Neutral Hostile
-
Actions
-
Item - Create (Random level (Level of (Killing unit)) item-type) at (Position of (Dying unit))[COLOR="Red"]
-
Item - Set the custom value of (Last created item) to 45
-
-------- Change 45 to any number for seconds to decay - in this instance the item will be gone in 45 seconds --------[/COLOR]
-
Wait 0.10 seconds
-
Point - Remove (Position of (Dying unit))
-
Trigger - Turn off (This trigger)
-
Wait 90.00 seconds
-
Trigger - Turn on (This trigger)
Again WEU.
In this case every 90 seconds I want the drop to take place, thus I have turn on turn off.
The Red in this trigger is the addition of a decay system in this trigger - if you do not want it, then remove the 'item - set custom value' Again I am using WEU which has point-remove point. Check out that tutorial link about cleaning up leaks.
The decay system for this trigger cleans up my map of items that were not picked up. There is a set up for it:
-
ItemRemove
-
Events
-
Time - Every 1.00 seconds of game time
-
Conditions
-
Actions
-
Item - Pick every item in (Playable map area) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked item) is owned) Equal to False
-
((Picked item) is invulnerable) Equal to False
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Custom value of (Picked item)) Less than or equal to 0
-
Then - Actions
-
Item - Remove (Picked item)
-
Else - Actions
-
Item - Set the custom value of (Picked item) to ((Custom value of (Picked item)) - 1)
-
Floating Text - Create floating text that reads (String((Custom value of (Picked item)))) at (Position of (Picked item)) with Z offset 48.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 50.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 32.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 0.50 seconds
-
Else - Actions
And should the player want to drop a thing:
-
ItemDrop
-
Events
-
Unit - A unit Acquires an item
-
Unit - A unit Loses an item
-
Conditions
-
Actions
-
Item - Set the custom value of (Item being manipulated) to 60
If there is an item you do not want to vanish set it to invulnerable:
-
Boss drops
-
Events
-
Unit - A unit Loses an item
-
Conditions
-
(Owner of (Triggering unit)) Equal to Neutral Extra
-
Actions
-
Item - Make (Last dropped item) Invulnerable
Your event/condition can be anything you want.
This whole drop system works rather nicely. Mind I have mine set to creating a random item level depending on the level of the killing unit.
If there is a small set of items you want to drop you can change it to drop level 11 items - you change the level of the items in object editor to level 11.
You need to decide which is easier for you, how many items you want to drop.
Campaign items are level 0 so will not drop unless you either create a trigger that allows certain campaign objects to drop from specific units OR if you go into object editor and change the level of the item to something above 0.