I'd like to extend Nestharus' Dummy struct so that in the constructor I add a special effect on the unit. Here's what I've tried:
The special effect isn't visible, so I believe that I'm not referencing the unit correctly. What is the correct syntax?
JASS:
struct Element extends array
thistype nextUnit
thistype prevUnit
private effect art
private delegate Dummy Dummy
static method create takes real x, real y, real facing returns thistype
local thistype this = Dummy.create(x, y, facing)
set this.art = AddSpecialEffectTarget(EFFECT, this.unit, "origin")
set Dummy = this
return this
endmethod
method destroy takes nothing returns nothing
call DestroyEffect(this.art)
call Dummy.destroy()
endmethod
endstruct
The special effect isn't visible, so I believe that I'm not referencing the unit correctly. What is the correct syntax?
Last edited by a moderator: