|
|

Hi guys,
(Hope this is the right place for this)
I'm currently working on coding my Hero from Dream into HoN, and of course there are some snags along the way that I hope some of you guys have a good idea of how to work out.
The hero I'm trying to code is my Dream hero Wit (Link to Dream page)
I have layed it out as follows:
The first ability: Knife juggle
I have split this ability in two. First part takes care of the toggle for gaining knife charges, and the launching of knives into the air on toggle off. The second part is the target ability that deals with the executing of throwing the juggling knives.
Ability1:
Setting up dobble interface for this ability.
ability.entity
Code:<?xml version="1.0" encoding="UTF-8"?> <ability name="Ability_Wit1" icon="icon.tga" anim="ability_1" casttime="1100" castactiontime="400" maxlevel="4" requiredlevel="1,3,5,7" actiontype="toggle" casteffecttype="" interface="double" manacost="25" cooldowntime="1000" range="400" modifierkey="wit_juggle1,wit_juggle2,wit_juggle3,wit_juggle4" > <modifier key="wit_juggle1" modpriority="90" disabled="true" /> <modifier key="wit_juggle2" modpriority="90" disabled="true" /> <modifier key="wit_juggle3" modpriority="90" disabled="true" /> <modifier key="wit_juggle4" modpriority="90" disabled="true" /> </ability>
Ability1a:
Toggle ability for starting the juggling
abilitya.entity
Code:<?xml version="1.0" encoding="UTF-8"?> <ability name="Ability_Wit1a" icon="icona.tga" anim="" casttime="0" castactiontime="0" maxlevel="4" requiredlevel="1,3,5,7" targetscheme="enemy_units" targetradius="2500" actiontype="toggle" casteffecttype="" manacost="25" cooldowntime="1000" maxcharges="4,5,6,7" > <ontoggleon> <setcharges a="2" /> <starttimer duration="1000,800,600,400" /> </ontoggleon> <ontoggleoff> <compare a="charges" b="0" op="gt"> <spawnaffector name="Affector_Wit_Ability1a" /> <setcharges a="0" /> <resettimer /> </compare> <else> <resettimer /> </else> </ontoggleoff> <ontimer> <addcharges entity="this_entity" count="1" /> <setaccumulator entity="this_entity" value="charges" /> <printvalue label="==== Charges =" value="charges" /> <printvalue label="==== SetAccumulator =" value="accumulator" /> <compare a="charges" b="4,5,6,7" op="lt"> <starttimer duration="1000,800,600,400" /> </compare> </ontimer> <onattack> <compare a="charges" b="0" op="gt"> <removecharge /> </compare> </onattack> <ondeath> <setcharges a="0" /> </ondeath> <modifier key="Wit_Artist_1" modpriority="100" maxcharges="5,6,7,8" > <ontimer> <addcharges entity="this_entity" count="1" /> <compare a="charges" b="5,6,7,8" op="lt"> <starttimer entity="this_entity" duration="1000,800,600,400" /> </compare> </ontimer> </modifier> <modifier key="Wit_Artist_2" modpriority="100" maxcharges="5,6,7,8" > <ontimer> <addcharges entity="this_entity" count="1" /> <compare a="charges" b="5,6,7,8" op="lt"> <starttimer entity="this_entity" duration="1000,800,600,400" /> </compare> </ontimer> </modifier> <modifier key="Wit_Artist_3" modpriority="100" maxcharges="6,7,8,9" > <ontimer> <addcharges entity="this_entity" count="1" /> <compare a="charges" b="6,7,8,9" op="lt"> <starttimer entity="this_entity" duration="1000,800,600,400" /> </compare> </ontimer> </modifier> <modifier key="Wit_Artist_4" modpriority="100" maxcharges="7,8,9,10" > <ontimer> <addcharges entity="this_entity" count="1" /> <compare a="charges" b="7,8,9,10" op="lt"> <starttimer entity="this_entity" duration="1000,800,600,400" /> </compare> </ontimer> </modifier> <modifier key="wit_juggle1" modpriority="90" baselevel="1" keyslot="0" /> <modifier key="wit_juggle2" modpriority="90" baselevel="2" keyslot="0" /> <modifier key="wit_juggle3" modpriority="90" baselevel="3" keyslot="0" /> <modifier key="wit_juggle4" modpriority="90" baselevel="4" keyslot="0" /> </ability>
affector.entity
Code:<?xml version="1.0" encoding="UTF-8"?> <affector name="Affector_Wit_Ability1a" radius="2500" lifetime="1000" maximpactspertarget="1" targetselection="all" targetscheme="enemy_units" effecttype="Physical" impactdelay="1000" persist="true" > <onexpired> <playeffect effect="effects/aoe1.effect" source="this_position" target="" occlude="true" /> </onexpired> <onimpact> <applystate name="State_Wit_Ability1a_Enemy" duration="2000" /> <setvar0 a="accumulator" b="15,20,25,30" op="mult" /> <printvalue label="==== val0 =" value="val0" /> <printvalue label="==== accumulator =" value="accumulator" /> <damage effecttype="Physical" amount="1" b="val0" op="mult" /> <damage effecttype="Physical" amount="100,200,300,400" /> </onimpact> </affector>
statea_enemy.entity
Code:<?xml version="1.0" encoding="UTF-8"?> <state name="State_Wit_Ability1a_Enemy" icon="icon.tga" effecttype="StatusDebuff" allowtransfer="true" movespeedslowpercharge="0.04" > <oninflict> <setcharges entity="this_entity" a="accumulator" /> <printvalue label="==== Charges enemy =" value="charges" /> </oninflict> </state>
Ability1b:
Ability for triggering knifthrow
abilityb.entity
Code:<?xml version="1.0" encoding="UTF-8"?> <ability name="Ability_Wit1b" icon="iconb.tga" anim="" casttime="0" castactiontime="0" maxlevel="4" requiredlevel="1,3,5,7" actiontype="target_entity" targetscheme="enemy_units" range="600" > <onimpact> <applystate name="State_Wit_Ability1b_Self" target="source_entity" proxy="target_entity" continuous="true" /> </onimpact> <modifier key="wit_juggle1" modpriority="90" baselevel="1" keyslot="1" /> <modifier key="wit_juggle2" modpriority="90" baselevel="2" keyslot="1" /> <modifier key="wit_juggle3" modpriority="90" baselevel="3" keyslot="1" /> <modifier key="wit_juggle4" modpriority="90" baselevel="4" keyslot="1" /> </ability>
state_self.entity
Code:<?xml version="1.0" encoding="UTF-8"?> <state name="State_Wit_Ability1b_Self" icon="icon.tga" passiveeffect="" impactinterval="600,500,400,300" effecttype="Physical" > <onimpact> <distance target="source_entity" source="proxy_entity" /> <compare a="result" b="800" op="lt"> <spawnprojectile name="Projectile_Wit_Ability1b" source="source_entity" target="proxy_entity" noresponse="true" /> </compare> <else> <expirestate name="State_Wit_Abillity1b_Enemy" target="proxy_entity" /> <expire /> </else> </onimpact> <onkill> <expire /> </onkill> <onexpired> <expirestate name="State_Wit_Ability1b_Enemy" target="proxy_entity" /> </onexpired> </state>
stateb_enemy.entity
Code:<?xml version="1.0" encoding="UTF-8"?> <state name="State_Wit_Ability1b_Enemy" icon="icon.tga" effecttype="StatusDebuff" allowtransfer="true" > <oninflict> <addcharges count="1" /> </oninflict> <onrefresh> <addcharges count="1" /> </onrefresh> <modifier key="Wit_Artist_1" modpriority="80" movespeedslowpercharge="0.02" /> <modifier key="Wit_Artist_2" modpriority="80" movespeedslowpercharge="0.04" /> <modifier key="Wit_Artist_3" modpriority="80" movespeedslowpercharge="0.06" /> <modifier key="Wit_Artist_4" modpriority="80" movespeedslowpercharge="0.08" /> </state>
Ability 2:
Gives passiv bonus to ability 1
ability.entity
Code:<?xml version="1.0" encoding="UTF-8"?> <ability name="Ability_Wit2" icon="icon.tga" maxlevel="4" requiredlevel="1,3,5,7" actiontype="passive" modifierkey="Wit_Artist_1,Wit_Artist_2,Wit_Artist_3,Wit_Artist_4" > </ability>
The problem is that i can't get the two subabilities in ability 1 to affect eachother. Like reducing charges in ability1a duo to targeting with ability1b. Is there a method for passing variables among abilities?
I have posted my whole code for ability 1 and 2. Hopefully someone will help me get back on track. Is there better methods for coding this hero?
Thanks in advance!
-Lirion