- Joined
- Aug 6, 2008
- Messages
- 6
I am trying to create an item at a given location based on what the name of a target of an ability was.
Here I am:
For example if I target the unit "Chicken" I want it to turn into the item "Chicken"
Help plz!!
Here I am:
JASS:
function Trig_Pack_Up_Target_Actions takes nothing returns nothing
local MyItem = GetObjectName(GetSpellTargetUnit())
call RemoveUnit (GetSpellTargetUnit())
call CreateItem (MyItem, GetUnitX(GetSpellTargetUnit()), GetUnitY(GetSpellTargetUnit()))
endfunction
Help plz!!