technical questions

Status
Not open for further replies.
Level 23
Joined
Apr 16, 2012
Messages
4,041
Please post all technical questions here, other will try to answer

And because I have one streight away, Im going to ask:

Will unit receive any ability through UnitAddAbility(passives including) or will all spells be learnt from Learn interface(firing EVENT_PLAYER_HERO_SKILL)?

That is crucial for the system Im making, I have 2 options:

provide a wrapper for abilities that will not be learnt by opening the Hero spell interface but will increase the Attack/Resistence Type, or I will have to hook UnitAddAbility and UnitRemoveAbility, which I dont want to
 
well, in case you wqnt to add some temp ability that gives bonuses, you call UnitAddAbility, start timer or something then remove it

with the Resistence and Atrack enchancemet system, if you want to add temp ability that gives you some resistence/attack type for period of time, calling UnitAddAbility is not enough
wrapper function is function that wraps some other, for instance for this case, we could use UnitAddAbilityEx which would be used if the ability is meant to increase/decrease resistence and/or attack type, because you need to say that "oh, this ability gives you 5 fire resistence, just so you know"
 
so I have another question, again for the Resistance system

If you ever intend to use this system, will you bind the Attack/Resistance values to spells/items globally or do you want to bind every type to unit?(Meaning that the same spell may give different resistence/attack values and types to different units)
 
how can hook bug? it only rewrites the code to call TriggerExecute(prototype__...[index])
but ok, let hooks be hooks, Im not hooking anyways

the global values:
pros
- a lot easier to make
cons
- less modular

per unit:
pros
- you can have the same ability for 2 units giving different resistence/attack types and/or values(so you have ability A on unit UA and UB, and UA gets lets say 5 fire resistence from ability A while unit UB gets 4 ice resistence from ability A)
cons
- a lot harder to make
- will require more variables
 
Status
Not open for further replies.
Back
Top