#Drow Ranger Marksmanship

1 messages · Page 1 of 1 (latest)

verbal totem
#

Basically I'm trying to make an old version of Marksmanship that deals extra damage, and it's currently working when the toggle state for the ability is on, but if I manually cast it won't work (I tried to print self.ability.force_frost_arrow in the OnAttackStart function and it returns nil)

I'm using dota imba's frost arrows as a base

#

gotta add that one as well ig

arctic wolf
#

It looks like Frost Arrow, not Marksmanship, so it's a orb-attack ability?
Did you added DOTA_ABILITY_BEHAVIOR_ATTACK flag in ability behavior?

verbal totem
#

yes, it's an orb attack (marksmanship used to be orb)

#

the ability works fine if I have autocast on

#

and it works with manually casting if I have autocast on as well

#

it just doesn't work if autocast is off but I manually try to cast the ability

#

I think the force_frost_arrow boolean is just not being passed to the modifier somehow

arctic wolf
#

It seems not runs into OnSpellStart , try log it in other place?

verbal totem
#

is there a chance this is messing up with it

arctic wolf
verbal totem
#

it's not

#

tried it out

#

I'm confused

arctic wolf
#

in my test

#

it wont trigger OnSpellStart

#

so the force_frost_arrow flag will always be false or nil

verbal totem
#

so how do I make it

#

so that if I cast it manually with auto cast off

#

it will still work?

#

I'm assuming there's no function like IfManuallyCast

arctic wolf
#

GetCurrentActiveAbility

#

in the OnAttackStart

verbal totem
#

now it works perfectly

#

thank you

#

GetCurrentActiveAbility is what I needed

verbal totem
#

I'm trying to make my own special bonus attributes

#

but the modifier doesn't seem to work

#

I know it's reaching the modifier class

#

because I made it print "hi" inside of getmodifierbonusstats_strength and it spams my console with hi

#

so its just that for some reason its not increasing the stat

#

maybe it has something to do with this being a champ ability instead of an item?

#

(doesn't increase str/agi/int every time I level up)

golden escarpBOT
#

Found 10 functions for Calc

🇸 🇨 CalcClosestPointOnEntityOBB(arg1: handle, arg2: Vector): Vector
Compute the closest point on the OBB of an entity.
🇸 🇨 CalcDistanceBetweenEntityOBB(arg1: handle, arg2: handle): float
Compute the distance between two entity OBB. A negative return value indicates an input error. A return value of zero indicates that the OBBs are overlapping.
🇸 🇨 CalcDistanceToLineSegment2D(arg1: Vector, arg2: Vector, arg3: Vector): float
🇸 CDOTA_BaseNPC:CalculateGenericBonuses(): nil
🇸 CDOTA_BaseNPC_Hero:CalculateStatBonus(force: bool): nil
Recalculate all stats after the hero gains stats.
and 5 more…

arctic wolf
#

Maybe it's just a client-side display issue, try calculateStatBonus

verbal totem
#

where should I throw that

#

inside of each modifier property?

#

unfortunately not, makes my game crash

arctic wolf
#

when ability upgrade ( like OnUpgrade callback?

verbal totem
#

like this?

#

still doesnt work

#

I'm so confused

restive pumice
#

Avoid having special_bonus in the name of your custom abilities. Dota will think it's a talent or something. Show code of the ability not just the modifier.

#

Nvm I am blind.

#

Well you can try changing the ability name and modifier name to not have special_bonus. Check if path to the modifier is correct, make the modifier visible to see if it's even applied.

verbal totem
#

the modifier is applied, maybe its just the name

arctic wolf
#

Ok

#

I know

#

you use the incorrect keyvalue format in kv

#

There are two ways to define ability special values in kv:
AbilitySpecial & AbilityValues

#

you define as old AbilitySpecial but in AbilityValues

#

so it returns 0 with GetSpecialValueFor

#

the format difference between them

verbal totem
#

ah I think I understand

#

when should I use abilityvalues and abilityspecial?

arctic wolf
#

no difference, it depends on personal preferences

#

but seems the valve is gradually replacing AbilitySpecial with AbilityValues

#

so AbilityValues better I think, it‘s much clear

restive pumice
#

AbilitySpecial is still supported

#

but yeah you should use AbilityValues because knowing Valve they will stop supporting it

verbal totem
#

so it's more of a futureproof thing