Creating Illusion with Trigger

Wummi

Just Relax and Smile!
Reaction score
58
Create a dummy with inventory
Give the dummy a Wand of Illusion
Order it to use the item on your hero with triggers.
 

jig7c

Stop reading me...-statement
Reaction score
123
make a new trigger, convert it to custom text, delete everything from it, and paste the following code in it...
Code:
function CloneUnit takes unit u, location loc returns unit 
    local gamecache cloneunit = InitGameCache("CloneUnit")
     
    call StoreUnit(cloneunit, "Clone", "ClonedUnit", u) 
    set bj_lastCreatedUnit = RestoreUnit(cloneunit, "Clone", "ClonedUnit", GetOwningPlayer(u), GetLocationX(loc), GetLocationY(loc), GetUnitFacing(u)) 
    call FlushGameCache(cloneunit)
     
    set u = null 
    call RemoveLocation(loc)
    set loc = null
     
    return bj_lastCreatedUnit 
endfunction

Trigger:
  • Actions
    • local unit u
    • local location l
    • Set TempUnit = Triggering Unit
    • set u = udg_TempUnit
    • set l = GetUnitLoc (u)
    • call CloneUnit (u, l)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top