- Joined
- Mar 12, 2013
- Messages
- 4
Hello,
I have a problem in a trigger I am doing right now. I want to try to remove a destructable, but somehow "call RemoveDestructable(d)" doesn't seem to work, neither does "call KillDestructable(d)". What does work though is to hide the destructable, so it shouldn't be a variable problem. Does anyone know the issue and how to fix it?
Thanks in advance.
I have a problem in a trigger I am doing right now. I want to try to remove a destructable, but somehow "call RemoveDestructable(d)" doesn't seem to work, neither does "call KillDestructable(d)". What does work though is to hide the destructable, so it shouldn't be a variable problem. Does anyone know the issue and how to fix it?
Thanks in advance.
JASS:
struct Slot
trackable tra
multiboard mb
destructable d
integer st
trigger t
trigger t2
real x
real y
real f
method TrackableOnHoverAction takes nothing returns nothing
local SlotType slty=.st
call DisplayTextToPlayer(Player(0),0,0,("hover"+slty.text))
endmethod
method UpdateSlotType takes integer i returns nothing
call KillDestructable(.d)
endmethod
static method create takes string s,real x,real y,real f,integer i returns Slot
local Slot this=Slot.allocate()
local SlotType ST=i
set .x=x
set .y=y
set .f=f
set .st=i
set .d=CreateDestructable(ST.d,x,y,f,1,0)
set .tra=CreateTrackable(s,x,y,f)
set .t=CreateTrigger()
call TriggerRegisterTrackableTrackEvent(.t,.tra)
call TriggerAddAction(.t,function TrackableOnHover)
return this
endmethod
endstruct
Last edited by a moderator: