NetherHawk
New Member
- Reaction score
- 26
I have tried to make the smokescreen ability in dota which disables spells, reduces ias and ms and gives a chance to miss.
What i have done:
Base ability of a summon unit ability
Order summoned unit to cast cloudoffog
Smokescreen Targets: enemy,ground,air,organic, neutral
data - chance to miss .4/.5/.6/.7
data - ms modifier -.25
data - as modifier -.25
data - attacks prevented - special/spells
aoe - 250/275/300/325
duration for hero and normal - 6
However, the enemy units within the aoe of the smokescreen are not affected. Why is this so?
the dummy already has the smokescreen effect ability and is invulnerable.
What i have done:
Base ability of a summon unit ability
Order summoned unit to cast cloudoffog
Smokescreen Targets: enemy,ground,air,organic, neutral
data - chance to miss .4/.5/.6/.7
data - ms modifier -.25
data - as modifier -.25
data - attacks prevented - special/spells
aoe - 250/275/300/325
duration for hero and normal - 6
However, the enemy units within the aoe of the smokescreen are not affected. Why is this so?
JASS:
// Objects Used:
// 'A02V' = Smokescreen (Stealth Assasin : Rikimaru)
// 'A02R' = Smokescreen Effect
// 'o00A' = Smokescreen Dummy
function Smokescreen_Conditions takes nothing returns boolean
return GetUnitTypeId(GetSummonedUnit()) == 039;o00A039;
endfunction
function Smokescreen_Actions takes nothing returns nothing
local unit u = GetSummoningUnit()
local unit d = GetSummonedUnit()
local integer i = GetUnitAbilityLevel(u,039;A02V039;)
local real x = GetUnitX(d)
local real y = GetUnitY(d)
local real r = (87+(17*I2R(i)))*.01 //size of the fog
call SetUnitAbilityLevel(d,039;A02R039;,i)
call IssuePointOrder(d,"cloudoffog",x,y)
call UnitAddAbility(d,039;Aloc039;)
call SetUnitScale(d,r,r,r)
set u = null
set d = null
endfunction
function InitTrig_Smokescreen takes nothing returns nothing
set gg_trg_Smokescreen = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Smokescreen,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(gg_trg_Smokescreen,Condition(function Smokescreen_Conditions))
call TriggerAddAction(gg_trg_Smokescreen,function Smokescreen_Actions)
endfunction
the dummy already has the smokescreen effect ability and is invulnerable.