[Spell] Spell Trigger Request

Status
Not open for further replies.
Hello guys, need to make a trigger of a custom spell.
A unit activates Immolation he will have the ability Phoenix Fire. As long as Immolation is active, he'll have the ability Phoenix Fire. But when he deactivates Immolation, he'll no longer have the ability Phoenix Fire.

Can you help me make a trigger that causes no bug, no lags and no leaks?

Thank you.
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
  • Immolation On
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(immolation))
    • Actions
      • Unit - Add Phoenix Fire to (Triggering unit)
  • Immolation Off
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(unimmolation))
    • Actions
      • Unit - Remove Phoenix Fire from (Triggering unit)
If you need multiple levels of the ability, you need to change the ability level of phoenix fire, when immolation is learned and obviously set the level, when you add the ability.
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
I didn't test it, but it also seems to have problems with stuns, as you can order immolation, while the unit is stunned.
Using the normal "starts the effect of an ability" works better, however it's difficult to detect when immolation ends.

edit: yeah you are right.

  • Immolation On
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Immolation
    • Actions
      • Unit - Add Phoenix Fire to (Triggering unit)
      • Unit Group - Add (Triggering unit) to ImmolationGroup
      • Game - Display to (All players) the text: on
      • Trigger - Turn on Immolation Off <gen>
Can't think of any other way than periodic checks to detect when immolation ends.
  • Immolation Off
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Set GroupIsEmpty = True
      • Unit Group - Pick every unit in ImmolationGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Immolation) Equal to True
            • Then - Actions
              • Set GroupIsEmpty = False
            • Else - Actions
              • Unit - Remove Phoenix Fire from (Picked unit)
              • Unit Group - Remove (Picked unit) from ImmolationGroup
              • Game - Display to (All players) the text: off
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GroupIsEmpty Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Last edited:
difficult to detect when immolation ends
Immolation gives the caster a buff which we could check to detect when the effect turned off/on.
In Object Editor Immolation has 2 buffs, 1. Buff is placed on caster and defines Visual effects, 2. one Defines stackability. Edit: Thought would work like blizzard.
 
Last edited:
Level 16
Joined
Mar 25, 2016
Messages
1,327
I've already thought about this:
When unimmolation is ordered, you periodically check until the unit no longer has the buff. However there are some problems. You can order unimmolation while stunned and still order a different order afterwards while still being stunned and immolation won't be canceled. Also as you said it does not work when the unit runs out of mana.
 
Last edited:
WTF, i always though immolation/permanent stacks if different buffs are insert, just something to me expiments.

To The triggers, this one works fine:
The Stun thing is not a problem, cause the unit won't receive any order-Events while beeing stuned, checkout Uploaded map you can stun Demonhunter with Mountainking.
  • Immolation Init
    • Ereignisse
      • Map initialization
    • Bedingungen
    • Aktionen
      • -------- makes copying the Spell more easy --------
      • Set ImmolationSubSkill = Phönixfeuer
      • Set ImmolationSkill = Feuerbrand
      • Set ImmolationBuff = Feuerbrand

  • Immolation On
    • Ereignisse
      • Unit - A unit Order no Target
    • Bedingungen
      • (Level of ImmolationSkill for (Triggering unit)) UnEqual 0
      • (Issued order) Equal (Order(immolation))
    • Aktionen
      • Einheitengruppe - Add (Triggering unit) to ImmolationRegistered
      • Trigger - Turn on Immolation check <gen>
      • Unit - Add ImmolationSubSkill to (Triggering unit)
      • Unit - Set level of ImmolationSubSkill for (Triggering unit) to (Level of ImmolationSkill for (Triggering unit))
      • -------- Nex Line make PhoenixFire keepd if Morphing --------
      • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit(), true, udg_ImmolationSubSkill)
  • Immolation check
    • Ereignisse
      • Zeit - Every 0.20 seconds of game time
    • Bedingungen
    • Aktionen
      • -------- Loop all Units having this --------
      • Einheitengruppe - Pick every unit in ImmolationRegistered and do (Actions)
        • Schleifen - Aktionen
          • -------- Remove Phoneixfire and ick out of group if buff disappeard --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • ((Picked unit) has buff ImmolationBuff) Equal False
            • 'THEN'-Aktionen
              • Einheitengruppe - Remove (Picked unit) from ImmolationRegistered
              • Unit - Remove ImmolationSubSkill from (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - CondItions
                  • (ImmolationRegistered is empty) Gleich True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
 

Attachments

  • Immolation with Phoenix.w3x
    21.7 KB · Views: 25
Thank you guys for all the help and replies.
I tried these triggers:
This one when Illidan activates Immolation
  • FA On
    • Events
      • Unit - Illidan (Evil) 0379 <gen> Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Immolation
    • Actions
      • Unit - Add PhoenixFire to Illidan (Evil) 0379 <gen>
      • Unit - Set level of PhoenixFire for Illidan (Evil) 0379 <gen> to (Level of Immolation for Illidan (Evil) 0379 <gen>)
This one when Illidan deactivates Immolation
  • FA Off
    • Events
      • Unit - Illidan (Evil) 0379 <gen> Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(unimmolation))
    • Actions
      • Unit - Remove PhoenixFire from Illidan (Evil) 0379 <gen>
This one when Illidan runs out of mana
  • FA No Mana
    • Events
      • Unit - Illidan (Evil) 0379 <gen>'s mana becomes Less than 3.00
    • Conditions
    • Actions
      • Unit - Remove PhoenixFire from Illidan (Evil) 0379 <gen>
When Illidan uses Metamorphosis:


  • FA Morph On
    • Events
      • Unit - Illidan (Evil) 0379 <gen> Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Metamorphosis (Evil Illidan)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Illidan (Evil) 0379 <gen> has buff Immolation) Equal to True
        • Then - Actions
          • Unit - Add PhoenixFire to Illidan (Evil) 0379 <gen>
          • Unit - Set level of PhoenixFire for Illidan (Evil) 0379 <gen> to (Level of Immolation for Illidan (Evil) 0379 <gen>)
        • Else - Actions
The biggest problem now, is when the effect of Metamorphosis ends.:vw_wtf:
Is there a solution for that?

I tried in the past this simple trigger and it worked but i don't know if it'll cause any lags for wooden pc's.
  • FFF
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Illidan (Evil) 0379 <gen> has buff Immolation) Equal to True
        • Then - Actions
          • Unit - Add PhoenixFire to Illidan (Evil) 0379 <gen>
          • Unit - Set level of PhoenixFire for Illidan (Evil) 0379 <gen> to (Level of Immolation for Illidan (Evil) 0379 <gen>)
        • Else - Actions
          • Unit - Remove PhoenixFire from Illidan (Evil) 0379 <gen>
What do you think guys? :goblin_cry:
 
I tried in the past this simple trigger and it worked but i don't know if it'll cause any lags for wooden pc's.
You don't need the Periodic Trigger. Phoneixfire is removed if no mana and if deactivaded so fine.

The biggest problem now, is when the effect of Metamorphosis ends
Use this after you add the Phoenoxfire
call UnitMakeAbilityPermanent(GetTriggerUnit(), true, 'Apxf')
it stops the remove of Phoneixfire if Morphing.
Therefore you can Remove the Morph trigger too.

Change 'Apxf' to the AbilityId of your Phonexfire, if you used a custom one.
 
Status
Not open for further replies.
Top