#Lane creep only casting instant spells

1 messages · Page 1 of 1 (latest)

visual nacelle
#

I suspect the lane creeps' cast order is being interrupted due to SetInitialGoalEntity(). Does anyone know how to force the creep to cast the ability anyway? I tried setting SetMustReachEachGoalEntity( false) just before the cast order, but it didn't work.

meager kindle
#

maybe you could give them a modifier with command restricted after issuing the cast order and remove it when they finish

visual nacelle
#

Oh, interesting. I'll try that

visual nacelle
#

No success. I tried adding the comman-restriction modifer immediately after, one frame after, and even tried this:

function modifier_apprentice_command_restricted:CheckState()
    return {
        [MODIFIER_STATE_COMMAND_RESTRICTED] = self:GetParent():GetCurrentActiveAbility()~=nil,
    }
    -- if not IsServer() then return end
end

This is the console printout:

npc_dota_creep_lane    DOTA_UNIT_ORDER_CAST_NO_TARGET    lycan_summon_wolves    npc_dota_creep_lane
triggering smartcast ability
Filter result is      true
[
   OrderType    = (8)
   AbilityIndex    = (1070)
   TargetIndex    = (570)
   UnitIndex    = (1066)
]
meager kindle
#

do they keep walking while command restricted?

visual nacelle
#

Yes

meager kindle
#

so i guess their movement/attacks dont count as orders then.
do they even have animations for casting ?
you could just root them and use OnSpellStart after a delay

visual nacelle
#

I'll give that a shot

#

Hm. I disarmed and rooted them immediately after the order was given, but that didn't work either

#

Someone mentioned that a mode did this successfully recently. Any idea what it was called?

meager kindle
#

dont know

#

i said OnSpellStart though, not an order.

#

instead of trying to do it through orders you could simulate the cast delay, set the target, and directly call OnSpellStart

visual nacelle
#

Oh, I thought that would only work for non-target abilities. Interesting. I'll definitely try that.

plush heartBOT
meager kindle
#

1 for each target type

visual nacelle
#

That's working beautifully. Thanks again!

neat thistle
#

The base class of lane creeps are specially for C++ underlying, they cant receive normal order, try replace their baseclass with 'npc_dota_creature' (but may cause other questions, like they move really slow...

meager kindle
#

they can receive orders, it just very quickly gets overridden by a new order that doesnt run through the order filter.

hollow quartz
#

I think using the API calls instead of ExecuteOrder circumvents your issue, I remember wrestling with this at some point and fixing it by using the CastSpell calls