NetherHawk
New Member
- Reaction score
- 26
Ok i have this set of coding. what im trying to do is if there is a destructible in the rect, i have a set of coding to carry out. there will be another set of coding if there isnt. so how do i check if there is or isnt a destructible.
how do i check that dt has actually been set to a destructable
if there are no destrucatbles in the region, what value does dt have
i tried creating a special effect for
it doesnt work. however, if i put this line below the 'set dt' it works. so how do i check whether dt has a value ? since 'dt != null' does not work. (assuming there is always at least 1 destructable in rt)
JASS:
local unit ux = GetTriggerUnit()
local rect rt
local destrutable dt
set rt = Rect(GetUnitX(ux)-400.,GetUnitY(ux)-400.,GetUnitX(ux)+400.,GetUnitY(ux)+400.)
set dt = RandomDestructableInRectBJ(rt,null)
how do i check that dt has actually been set to a destructable
if there are no destrucatbles in the region, what value does dt have
i tried creating a special effect for
JASS:
if dt != null then
call AddSpecialEffect("",GetDestrutableX(dt),GetDestrutabley(dt))
endif
it doesnt work. however, if i put this line below the 'set dt' it works. so how do i check whether dt has a value ? since 'dt != null' does not work. (assuming there is always at least 1 destructable in rt)