HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

channel ability

03-23-2006, 02:00 AM#1
Linera
I have an ability that channels.

How can I make it run the trigger each time its channel.
At least 2 units will channel this ability at the time its casted.

This ability is for a custom attack system.
03-23-2006, 02:01 AM#2
Immoralis
Can't you just detect when the effect happens and use local vars?
03-23-2006, 02:05 AM#3
Linera
its not working.

My Trigger:
Trigger:
Melee
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Attack
Collapse Actions
Set AttackingUnit = (Casting unit)
Set AttackedUnit = (Target unit of ability being cast)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Owner of AttackingUnit) controller) Equal to User
Collapse Then - Actions
Countdown Timer - Start CombatCheckTimer[(Player number of (Owner of AttackingUnit))] as a One-shot timer that will expire in 3.00 seconds
Set InCombat[(Player number of (Owner of AttackingUnit))] = True
Set StopTimer[(Player number of (Owner of AttackingUnit))] = False
Unit - Order AttackedUnit to Human Blood Mage - Banish AttackingUnit
Unit - Cause AttackingUnit to damage AttackedUnit, dealing 5.00 damage of attack type Normal and damage type Normal
Collapse Unit Group - Pick every unit in (Units owned by (Player((Player number of (Owner of AttackingUnit)))) of type Out of Combat) and do (Actions)
Collapse Loop - Actions
Unit - Remove (Picked unit) from the game
Collapse Else - Actions
Countdown Timer - Start CombatCheckTimer[(Player number of (Owner of AttackedUnit))] as a One-shot timer that will expire in 3.00 seconds
Set InCombat[(Player number of (Owner of AttackedUnit))] = True
Set StopTimer[(Player number of (Owner of AttackedUnit))] = False
Unit - Cause AttackingUnit to damage AttackedUnit, dealing 5.00 damage of attack type Normal and damage type Normal
Collapse Unit Group - Pick every unit in (Units owned by (Player((Player number of (Owner of AttackedUnit)))) of type Out of Combat) and do (Actions)
Collapse Loop - Actions
Unit - Remove (Picked unit) from the game
03-23-2006, 02:14 AM#4
Immoralis
Use, a unit starts the effect of an ability, and what is wrong?
03-23-2006, 02:16 AM#5
Linera
Its not running the trigger each time the spell is cast while its channeling.

Example:
Units Casts Attack
Channel runs, runs trigger
channel runs, runs trigger

Etc.
03-23-2006, 02:17 AM#6
Immoralis
have you tried debugging with displaying random text?
03-23-2006, 02:20 AM#7
Linera
only runs once.
03-23-2006, 02:22 AM#8
Immoralis
well it looks like you are banising the attacked unit, so you wont be able to attack it if its banished, unless banished is the base id of your channle ability...
03-23-2006, 02:23 AM#9
Linera
thats the base order ID of the ability as its a channel ability.
03-23-2006, 02:26 AM#10
Immoralis
could the variables be conflicting since you are detecting it on "begins?" try it on "a unit starts the effect of...."
03-23-2006, 02:28 AM#11
Linera
I've tried:

Trigger:
Unit - A unit Begins channeling an ability
Unit - A unit Begins casting an ability
Unit - A unit Starts the effect of an ability