ExecuteOrderFromTable({
OrderType = DOTA_UNIT_ORDER_CAST_POSITION,
UnitIndex = hero:entindex(),
Position = Vector(x, y, z),
AbilityIndex = ability:entindex()
})
Lua ability code:
function myAbility:CastFilterResultLocation(vLocation)
if self:GetCaster():GetTeamNumber() == DOTA_TEAM_GOODGUYS and vLocation.y > 0 then
return UF_FAIL_CUSTOM
end
return UF_SUCCESS
end
function myAbility:GetCustomCastErrorLocation(vLocation)
if self:GetCaster():GetTeamNumber() == DOTA_TEAM_GOODGUYS and vLocation.y > 0 then
return '#hud_error_cast_on_our_side_only'
end
return UF_SUCCESS
end
Error Message:
[ Developer ]: Game code tried to execute a custom invalid order: #hud_error_cast_on_our_side_only
ExecuteOrderFromTable
Lua ability code:
Error Message: