How can I properly destroy this special effect?

marvey323

Member
Reaction score
1
Trigger:
  • Increase Paladin Abilities to 2
    • Events
      • Dialog - A dialog button is clicked for PaladinAbilities2
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Clicked dialog button) Equal to PaladinAbilitiesLevel2[1]
          • (Clicked dialog button) Equal to PaladinAbilitiesLevel2[2]
          • (Clicked dialog button) Equal to PaladinAbilitiesLevel2[3]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to PaladinAbilitiesLevel2[1]
        • Then - Actions
          • Unit - Set level of Holy Light Paladin for PlayerUpgradingSkills[(Player number of (Triggering player))] to 2
          • Special Effect - Create a special effect at (Position of PlayerUpgradingSkills[(Player number of (Triggering player))]) using Abilities\Spells\Items\AIem\AIemTarget.mdl
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to PaladinAbilitiesLevel2[2]
            • Then - Actions
              • Unit - Set level of Blessing of the Gods for PlayerUpgradingSkills[(Player number of (Triggering player))] to 2
              • Special Effect - Create a special effect at (Position of PlayerUpgradingSkills[(Player number of (Triggering player))]) using Abilities\Spells\Items\AIem\AIemTarget.mdl
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to PaladinAbilitiesLevel2[3]
                • Then - Actions
                  • Unit - Set level of Divine Touch for PlayerUpgradingSkills[(Player number of (Triggering player))] to 2
                  • Special Effect - Create a special effect at (Position of PlayerUpgradingSkills[(Player number of (Triggering player))]) using Abilities\Spells\Items\AIem\AIemTarget.mdl
                • Else - Actions


As you can see, everytime a player clicks one of those 3 buttons that special effect is created. If i destroy it immediately, then they wont see the effect. If I use 'waits' then its not MUI. I don't see how to use timers here either..

Thanks in advance, +rep.
 

nabbig2

New Member
Reaction score
43
Why not just use waits?

You can just set (Last created effect) to the effect after it's made, then wait then destroy it.
 

lindenkron

You can change this now in User CP
Reaction score
102
Make a new trigger like this
Trigger:
  • DestroyEffect
    • Events
    • Conditions
    • Actions
      • Custom script: local effect tempEffect = udg_SpecialEffect
      • Wait 2 seconds
      • Custom script: call DestroyEffect (tempEffect)
      • Custom script: set tempEffect = null


add this to your current trigger:
Trigger:
  • Actions
    • Special Effect - Create a special effect attached to the origin of D_Caster[D_MUI_GO] using Abilities\Spells\Items\AIem\AIemTarget.mdl
    • Set SpecialEffect = (Last created special effect)
    • Trigger - Run DestroyEffect <gen> (ignoring conditions)


The SpecialEffect is a variable of type Special Effect.

gl,
-Lindenkron
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top