• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Trigger Help/Global Variables in GUI?

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2013
Messages
1,105
I'm attempting to make a spell that once activated adds a special effect (if user reads description they know what ability this stands for) the user can stop on ability "A" by activating another ability, now ability A will be added to users hero for 10 seconds, if they choose to not activate the "stopping" ability then after 3 seconds the special effect is removed and replaced with another. Continuing on, if they choose to stop now ability B gets added for 10 seconds and if they do not the special effect will be removed at 3 seconds and they will have the option to stop it on ability C which will can be stopped on which adds the ability for 10 seconds, if they choose not to add this spell either, then the spell ends. (---Although, if there is a way for it to cycle through another time that would be neat---)

If this is unclear, please say so, I will try to make it as clear as it is in my head in writing xD

I am trying to run a trigger checking conditions but the correct things do not happen in the game.

I think the problem is that I set the value of my int variable in one trigger, and when I reference in another trigger, they are not sharing information, or that when I run and check the conditions of the StopatSpell triggers they don't wait for the user to cast a spell. However, I could be totally wrong.

Anyway,

  • PB Cast Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pauer Blast (Start)
    • Actions
      • Set PauerBlast_Caster = (Casting unit)
      • Special Effect - Create a special effect attached to the overhead of PauerBlast_Caster using Abilities\Weapons\MurgulMagicMissile\MurgulMagicMissile.mdl
      • Wait 3.00 seconds
      • Trigger - Run StopOnSpell1 <gen> (checking conditions)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PauerBlast_Int Equal to 1
        • Then - Actions
          • Unit - Add Acceleration to PauerBlast_Caster
          • Wait 10.00 seconds
          • Unit - Remove Acceleration from PauerBlast_Caster
          • Special Effect - Destroy (Last created special effect)
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect attached to the overhead of (Casting unit) using Abilities\Weapons\SorceressMissile\SorceressMissile.mdl
          • Wait 3.00 seconds
          • Trigger - Run StopOnSpell2 <gen> (checking conditions)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PauerBlast_Int Equal to 2
            • Then - Actions
              • Unit - Add Arrow to PauerBlast_Caster
              • Wait 10.00 seconds
              • Unit - Remove Arrow from PauerBlast_Caster
              • Special Effect - Destroy (Last created special effect)
              • Trigger - Turn off (This trigger)
            • Else - Actions
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect attached to the overhead of (Casting unit) using Abilities\Weapons\BlackKeeperMissile\BlackKeeperMissile.mdl
              • Wait 3.00 seconds
              • Trigger - Run StopOnSpell3 <gen> (checking conditions)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PauerBlast_Int Equal to 3
                • Then - Actions
                  • Unit - Add ForcE! to PauerBlast_Caster
                  • Wait 10.00 seconds
                  • Unit - Remove ForcE! from PauerBlast_Caster
                  • Special Effect - Destroy (Last created special effect)
                  • Trigger - Turn off (This trigger)
                • Else - Actions
                  • Special Effect - Destroy (Last created special effect)
                  • Trigger - Turn off (This trigger)
  • StopOnSpell1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If ((Ability being cast) Equal to Pauer Blast (Stop) ) then do (Set PauerBlast_Int = 1) else do (Set PauerBlast_Int = 0)
  • StopOnSpell2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If ((Ability being cast) Equal to Pauer Blast (Stop) ) then do (Set PauerBlast_Int = 2) else do (Set PauerBlast_Int = 0)
  • StopOnSpell3
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If ((Ability being cast) Equal to Pauer Blast (Stop) ) then do (Set PauerBlast_Int = 3) else do (Set PauerBlast_Int = 0)
Thank you!
 
Last edited:
the turn of ( this trigger) is probably part of the problem. also ur ITE's should not be in tht first trigger as it is not being recasted to make them fire. you should set the special effect being cast to a variable and then destroy it using tht variable otherwise if any other effect goes off between the time of ur ability it will get overwritten.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Can you give us the proper Spell Description ?


Okay, I'm more awake this time, xD.
The ability starts--

You get a little special effect over your hero signifying (Ability 1)

Situation 1-
If you want the spell this signified ability, you cast A DIFFERENT ability (That you already have) when this happens, you then have this new spell added to your unit for 10 seconds. After which the added ability is removed. And the original spell ends.

Situation 2-
You don't want the ability that the first special effect signified then after 3 seconds, it removes the previous special effect then adds a new special effect signifying (Ability 2) and the same process happens as before one more time if you should choose not to have Ability 2.

Although with the help of my friend we restarted and got it to work now.
Thanks all though!
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Let me get this straight;
1. There are 3 spells (A, B, C)
2. When the Caster casts spell A (base spell), and immediately OR within 3 second period, cast Spell B, therefore a new ability is added (Spell D) to the Caster and in 10 seconds, Spell D is removed. At this rate, what happens to Spell A ?
Does it gets removed while Spell D intact with the unit ?
3. When the Caster casts spell A, and doesn't cast Spell B within 3 seconds, the Caster then gets Spell C that lasts for... ? 10 seconds too ?
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Rather than continue to try and explain, and fail miserably, this is the finished product and does what it should. So you can read and make sense of it, if you want, and no longer be confused by my bad explanations XD. -- (The spell as it pertains to the 3 seconds stuff was changed as it no longer was an issue!)

  • PB Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pauer Blast (Start)
    • Actions
      • Set PauerBlast_Caster = (Casting unit)
      • Set StopOrNotPB = (Casting unit)
      • Set PauerBlast_Int = (Random integer number between 1 and 3)
      • Set PauerBlast_Int = (Random integer number between 1 and 3)
      • Set PauerBlast_Int = (Random integer numberbetween 1 and 3)
      • Set PauerBlast_Int = (Random integer number between 1 and 3)
      • Trigger - Turn on PB Cast 2 <gen>
      • Wait 6.10 seconds
      • Set StopOrNotPB = No unit
  • PB Cast 2
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • StopOrNotPB Not equal to No unit
        • Then - Actions
          • Special Effect - Destroy PauerBlaster_SpecialEffect1
          • Set PauerBlast_Int = (PauerBlast_Int + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PauerBlast_Int Greater than or equal to 4
            • Then - Actions
              • Set PauerBlast_Int = 1
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PauerBlast_Int Equal to 1
            • Then - Actions
              • Special Effect - Create a special effect attached to the overhead of PauerBlast_Caster using Abilities\Weapons\MurgulMagicMissile\MurgulMagicMissile.mdl
              • Set PauerBlaster_SpecialEffect1 = (Last created special effect)
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PauerBlast_Int Equal to 2
            • Then - Actions
              • Special Effect - Create a special effect attached to the overhead of PauerBlast_Caster using Abilities\Weapons\SorceressMissile\SorceressMissile.mdl
              • Set PauerBlaster_SpecialEffect1 = (Last created special effect)
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PauerBlast_Int Equal to 3
            • Then - Actions
              • Special Effect - Create a special effect attached to the overhead of PauerBlast_Caster using Abilities\Weapons\BlackKeeperMissile\BlackKeeperMissile.mdl
              • Set PauerBlaster_SpecialEffect1 = (Last created special effect)
            • Else - Actions
              • Do nothing
        • Else - Actions
          • Special Effect - Destroy PauerBlaster_SpecialEffect1
          • Set PauerBlast_Int = 0
          • Set PauerBlast_Caster = No unit
          • Trigger - Turn off (This trigger)
  • PB Cast 3
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pauer Blast (Stop)
    • Actions
      • Trigger - Turn off PB Cast 2 <gen>
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PauerBlast_Int Equal to 1
        • Then - Actions
          • Set PBCastSpell = TBDSpell1
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PauerBlast_Int Equal to 2
        • Then - Actions
          • Set PBCastSpell = TBDSpell2
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PauerBlast_Int Equal to 3
        • Then - Actions
          • Set PBCastSpell = TBDSpell3
        • Else - Actions
          • Do nothing
      • Unit - Add PBCastSpell to (Triggering unit)
      • Wait 10.00 seconds
      • Unit - Remove PBCastSpell from PauerBlast_Caster
      • Special Effect - Destroy PauerBlaster_SpecialEffect1
      • Set PauerBlast_Caster = No unit
 
Status
Not open for further replies.
Top