johnnyfire
New Member
- Reaction score
- 8
This is the trigger I used in my DotA Troops map to make units from an item.
I was wondering if it leaked or if there was an easier way to create units with an item.
Example
-created charged item that is actively used [chargeitem]
-food [#] is max food minus food needed
-used this trigger
Create Unit
Events
Unit - A unit Uses an item
Conditions
(Item-type of (Item being manipulated)) Equal to [chargeitem]
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Hero manipulating item)) Food used) Less than or equal to [#]
Then - Actions
Unit - Create 6 [unit] for (Triggering player) at (Position of (Triggering unit)) facing (Facing of (Triggering unit)) degrees
Else - Actions
Hero - Create [chargeitem] and give it to (Hero manipulating item)
I was wondering if it leaked or if there was an easier way to create units with an item.
Example
-created charged item that is actively used [chargeitem]
-food [#] is max food minus food needed
-used this trigger
Create Unit
Events
Unit - A unit Uses an item
Conditions
(Item-type of (Item being manipulated)) Equal to [chargeitem]
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Hero manipulating item)) Food used) Less than or equal to [#]
Then - Actions
Unit - Create 6 [unit] for (Triggering player) at (Position of (Triggering unit)) facing (Facing of (Triggering unit)) degrees
Else - Actions
Hero - Create [chargeitem] and give it to (Hero manipulating item)