takethat
Active Member
- Reaction score
- 12
i use trigger to create a skill that when the caster cast the spell, it will:
-create 5 dummy caster with 0.5sec wait in btween
-5 dummy caster will attack random point 1 time each
-5 dummy caster will be expire in 0.5sec
-dummy attack combat animation is 0
to save space, i only copy 1 action since the other 4 is repeating.
Now the problem is this skill will went off in the middle if the unit cast another spell while this trigger still going.
Is there anyway to kept the trigger to go on? preferly not jass
10q
-create 5 dummy caster with 0.5sec wait in btween
-5 dummy caster will attack random point 1 time each
-5 dummy caster will be expire in 0.5sec
-dummy attack combat animation is 0
to save space, i only copy 1 action since the other 4 is repeating.
Code:
Flaming Arrow Cast
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Flaming Arrow (Forked Lighning)
Actions
Set FlamingArrow_targetunit[(Player number of (Owner of (Casting unit)))] = (Target unit of ability being cast)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Hero_unit[(Player number of (Owner of (Casting unit)))] is alive) Equal to True
Then - Actions
Set FlamingArrow_heropoint[(Player number of (Owner of (Cancelled structure)))] = (Position of Hero_unit[(Player number of (Owner of (Casting unit)))])
Set FlamingArrow_targetunitpoint[(Player number of (Owner of (Casting unit)))] = (Position of FlamingArrow_targetunit[(Player number of (Owner of (Casting unit)))])
Set FlamingArrow_realpoint[(Player number of (Owner of (Casting unit)))] = (Random real number between 0.00 and 200.00)
Set FlamingArrow_realdegree[(Player number of (Owner of (Casting unit)))] = (Random angle)
Set FlamingArrow_casterpoint[(Player number of (Owner of (Casting unit)))] = (FlamingArrow_heropoint[(Player number of (Owner of (Casting unit)))] offset by FlamingArrow_realpoint[(Player number of (Owner of (Casting unit)))] towards FlamingArrow_realdegree[(Player number of (Owner of (Casting unit)))] degrees)
Set FlamingArrow_RealH[(Player number of (Owner of (Casting unit)))] = (Random real number between 100.00 and 300.00)
Set FlamingArrow_targetRealpoint[(Player number of (Owner of (Casting unit)))] = (Random real number between 0.00 and 350.00)
Set FlamingArrow_targetRealdegree[(Player number of (Owner of (Casting unit)))] = (Random angle)
Set FlamingArrow_targetpoint[(Player number of (Owner of (Casting unit)))] = (FlamingArrow_targetunitpoint[(Player number of (Owner of (Casting unit)))] offset by FlamingArrow_targetRealpoint[(Player number of (Owner of (Casting unit)))] towards FlamingArrow_targetRealdegree[(Player number of (Owner of (Casting unit)))] degrees)
Unit - Create 1 Flaming Arrow Caster for (Owner of (Casting unit)) at FlamingArrow_casterpoint[(Player number of (Owner of (Casting unit)))] facing (Facing of Hero_unit[(Player number of (Owner of (Casting unit)))]) degrees
Unit - Add Crow Form to (Last created unit)
Unit - Remove Crow Form from (Last created unit)
Animation - Change (Last created unit) flying height to FlamingArrow_RealH[(Player number of (Owner of (Casting unit)))] at 90000000.00
Unit - Order (Last created unit) to Attack Ground FlamingArrow_targetpoint[(Player number of (Owner of (Casting unit)))]
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_FlamingArrow_heropoint[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))])
Custom script: call RemoveLocation (udg_FlamingArrow_targetunitpoint[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))])
Custom script: call RemoveLocation (udg_FlamingArrow_casterpoint[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))])
Custom script: call RemoveLocation (udg_FlamingArrow_targetpoint[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))])
Else - Actions
Do nothing
Wait 0.50 seconds
Set FlamingArrow_targetunit[(Player number of (Owner of (Casting unit)))] = No unit
Now the problem is this skill will went off in the middle if the unit cast another spell while this trigger still going.
Is there anyway to kept the trigger to go on? preferly not jass
10q