Kluckmuck
01-21-2011, 05:06 AM
So this is the first time I'm trying todo a charge based skill, and the most advanced I've done yet so obviously there are alot of bugs.
Basicly I want a channeling spell that gives you 1 charge for every 0.1 seconds you channel. The amount of charges you can store are based on lvl (20/40/60/80/100/100). When you reach maximum charges (or detonate it manually, dont really know how to this either, maybe double click if it works for abilitys) I want it to spawn a affector that does AoE damage based on how many charges you have.
And heres the code:
<?xml version="1.0" encoding="UTF-8"?>
<ability
name="Ability_Explode"
statuseffecttooltip="State_Behemoth_Ability2"
icon="icon.tga"
anim="ability_3"
casttime="500"
castactiontime="690"
channeltime="2000,4000,6000,8000,10000"
ischanneling="true"
maxlevel="6"
requiredlevel="1"
actiontype="target_self"
casteffecttype=""
manacost="0"
cooldowntime="7000"
targetscheme=""
maxcharges="20,40,60,80,100"
initialcharges="0"
>
<onlearn>
<setcharges a="1" />
</onlearn>
<onchannelframe>
<printdebuginfo />
<condition test="charges == 20">
<playeffect effect="/heroes/behemoth/ability_03/effects/impact.effect" />
</condition>
<condition test="charges == 40">
<playeffect effect="/heroes/behemoth/ability_03/effects/impact.effect" />
</condition>
<condition test="charges == 60">
<playeffect effect="/heroes/behemoth/ability_03/effects/impact.effect" />
</condition>
<condition test="charges == 80">
<playeffect effect="/heroes/behemoth/ability_03/effects/impact.effect" />
</condition>
<condition test="charges == 100">
<playeffect effect="/heroes/behemoth/ability_03/effects/impact.effect" />
</condition>
<pushstack a="20,40,60,80,100" />
<condition test="charges == result">
<spawnaffector name="Affector_Explode" target="source_entity" proxy="source_entity" />
<playeffect effect="/heroes/behemoth/ability_03/effects/impact.effect" />
</condition>
<applystate name="State_Explode" target="source_entity" proxy="this_entity" pushentity="true"/>
</onchannelframe>
<onchannelstart>
<playeffect effect="effects/cast.effect" source="target_position" occlude="true"/>
</onchannelstart>
</ability>
<?xml version="1.0" encoding="UTF-8"?>
<state
name="State_Explode"
icon="icon.tga"
passiveeffect="effects/state.effect"
effecttype="StatusDebuff"
duration="2000,4000,6000,8000,10000"
impactinterval="100"
>
<onimpact>
<addcharges count="1" entity="this_spawner_entity">
</onimpact>
</state>
<?xml version="1.0" encoding="UTF-8"?>
<affector
name="Affector_Explode"
radius="150"
targetselection="all"
targetscheme="enemy_units"
effecttype="Magic"
destroytrees="true"
model=""
impacteffect="/heroes/krixi/effects/ability_01/ability_01.effect"
>
<onimpact>
<damage effecttype="Magic" amount="80,95,110,125,140,155" />
<popup name="Spell_dmg" a="result" source="target_entity" target="source_entity"/>
</onimpact>
</affector>
Any help is appreciated :magm:
Basicly I want a channeling spell that gives you 1 charge for every 0.1 seconds you channel. The amount of charges you can store are based on lvl (20/40/60/80/100/100). When you reach maximum charges (or detonate it manually, dont really know how to this either, maybe double click if it works for abilitys) I want it to spawn a affector that does AoE damage based on how many charges you have.
And heres the code:
<?xml version="1.0" encoding="UTF-8"?>
<ability
name="Ability_Explode"
statuseffecttooltip="State_Behemoth_Ability2"
icon="icon.tga"
anim="ability_3"
casttime="500"
castactiontime="690"
channeltime="2000,4000,6000,8000,10000"
ischanneling="true"
maxlevel="6"
requiredlevel="1"
actiontype="target_self"
casteffecttype=""
manacost="0"
cooldowntime="7000"
targetscheme=""
maxcharges="20,40,60,80,100"
initialcharges="0"
>
<onlearn>
<setcharges a="1" />
</onlearn>
<onchannelframe>
<printdebuginfo />
<condition test="charges == 20">
<playeffect effect="/heroes/behemoth/ability_03/effects/impact.effect" />
</condition>
<condition test="charges == 40">
<playeffect effect="/heroes/behemoth/ability_03/effects/impact.effect" />
</condition>
<condition test="charges == 60">
<playeffect effect="/heroes/behemoth/ability_03/effects/impact.effect" />
</condition>
<condition test="charges == 80">
<playeffect effect="/heroes/behemoth/ability_03/effects/impact.effect" />
</condition>
<condition test="charges == 100">
<playeffect effect="/heroes/behemoth/ability_03/effects/impact.effect" />
</condition>
<pushstack a="20,40,60,80,100" />
<condition test="charges == result">
<spawnaffector name="Affector_Explode" target="source_entity" proxy="source_entity" />
<playeffect effect="/heroes/behemoth/ability_03/effects/impact.effect" />
</condition>
<applystate name="State_Explode" target="source_entity" proxy="this_entity" pushentity="true"/>
</onchannelframe>
<onchannelstart>
<playeffect effect="effects/cast.effect" source="target_position" occlude="true"/>
</onchannelstart>
</ability>
<?xml version="1.0" encoding="UTF-8"?>
<state
name="State_Explode"
icon="icon.tga"
passiveeffect="effects/state.effect"
effecttype="StatusDebuff"
duration="2000,4000,6000,8000,10000"
impactinterval="100"
>
<onimpact>
<addcharges count="1" entity="this_spawner_entity">
</onimpact>
</state>
<?xml version="1.0" encoding="UTF-8"?>
<affector
name="Affector_Explode"
radius="150"
targetselection="all"
targetscheme="enemy_units"
effecttype="Magic"
destroytrees="true"
model=""
impacteffect="/heroes/krixi/effects/ability_01/ability_01.effect"
>
<onimpact>
<damage effecttype="Magic" amount="80,95,110,125,140,155" />
<popup name="Spell_dmg" a="result" source="target_entity" target="source_entity"/>
</onimpact>
</affector>
Any help is appreciated :magm: