exists

Returns if the unit exists.

exists(unit) : boolean

Example

if exists('target') then
return cast(Attack, 'target')
end

Note

This does not check if the unit is in the object manager.