wellwish3r
wishes wells.
- Reaction score
- 52
I tried to make a blink spell that leaves an illusion behind, the method to create the illusion is called properly, however, nothing happens, here is the code:
the Illusion wand works when i use it manually.
JASS:
method createIllusion takes nothing returns nothing
local real x = GetUnitX(.munit)
local real y = GetUnitY(.munit)
local player p = GetOwningPlayer(.munit)
local unit u = CreateUnit(p,.did,x,y,GetUnitFacing(.munit))
local item it = CreateItem(.iid,0,0)
call UnitAddItem(u,it)
call UnitUseItemTarget(u,it,.munit)
set .count = .count + 1
call UnitApplyTimedLife(u,039;BTLF039;,3.0)
endmethod
the Illusion wand works when i use it manually.