• 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.

[Trigger] make my unit wait until spell charges?

Status
Not open for further replies.
Level 6
Joined
Jul 26, 2010
Messages
167
the part I comented is where the spell charges, but while it does, the unit still attacks and make it looks weird while casting. How I fix it? :/

  • CertainDeath loop
    • Acontecimientos
      • Time - Every 0.01 seconds of game time
    • Condiciones
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si: Condiciones
          • DistanciaCD Mayor que o igual (>=) a 2000
        • Entonces: Acciones
          • Custom script: call RemoveLocation(udg_TempPointCD[1])
          • Custom script: call RemoveLocation(udg_TempPointCD[2])
          • Unit group - Pick every unit in targetsCD[1] and do (Actions)
            • Loop: Acciones
              • Unit group - Remove (Picked unit) from targetsCD[1]
          • Unit group - Pick every unit in GroupDmgCD and do (Actions)
            • Bucle: Acciones
              • Unit group - Remove (Picked unit) from GroupDmgCD
          • Trigger - Turn off (This trigger)
        • Otros: Acciones
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si: Condiciones
          • ContCD[2] Mayor que o igual (>=) a 400
        • Entonces: Acciones
          • Set DistanciaCD = (DistanciaCD + 20)
          • Set TempPointCD[3] = (TempPointCD[1] offset by (Real(DistanciaCD)) towards AnguloCD degrees)
          • Unit - Create 1 blastCD for (Owner of casterCD) at TempPointCD[3] facing AnguloCD degrees
          • Unit - Add a 0.20 second Genérico expiration timer to (Last created unit)
          • Set targetsCD[1] = (Units within 100.00 of TempPointCD[3] matching (((Matching unit) belongs to an enemy of (Owner of casterCD)) Igual a True))
          • Custom script: call RemoveLocation(udg_TempPointCD[3])
          • Unit group - Pick every unit in targetsCD[1] and do (Actions)
            • Loop: Acciones
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si: Condiciones
                  • ((Picked unit) is in GroupDmgCD) Igual a False
                • Entonces: Acciones
                  • Unit group - Add (Picked unit) to GroupDmgCD
                  • Unit - Cause casterCD to damage (Picked unit), dealing 2500.00 damage of attack type Conjuros and damage type Normal
                  • Efecto especial - Create a special effect at (Position of (Picked unit)) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
                • Otros: Acciones
          • Custom script: call DestroyGroup(udg_targetsCD[1])
        • Otros: Acciones
          • -------- ----------HERE IS WHERE I NEED IT TO DONT ATTACK--------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si: Condiciones
              • ContCD[1] Mayor que o igual (>=) a 100
            • Entonces: Acciones
              • Set TempPointCD[3] = (TempPointCD[1] offset by (Real(DistanciaCD)) towards AnguloCD degrees)
              • Unit - Create 1 charging for (Owner of casterCD) at TempPointCD[3] facing AnguloCD degrees
              • Unit - Add a 2.00 second Genérico expiration timer to (Last created unit)
              • Set ContCD[1] = 0
              • Custom script: call RemoveLocation(udg_TempPointCD[3])
            • Otros: Acciones
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si: Condiciones
                  • ContCD[1] Menor que o igual a 100
                • Entonces: Acciones
                  • Animation - Play casterCD's stand ready animation
                  • Set ContCD[1] = (ContCD[1] + 1)
                  • Set ContCD[2] = (ContCD[2] + 1)
                • Otros: Acciones
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si: Condiciones
              • ContCD[2] Igual (==) a 400
            • Entonces: Acciones
              • Animation - Play casterCD's attack animation
            • Otros: Acciones
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si: Condiciones
              • ContCD[2] Igual (==) a 297
            • Entonces: Acciones
              • Unit - Create 1 charging2 for (Owner of casterCD) at (Position of casterCD) facing Vista edificio predeterminada degrees
              • Unit - Add a 1.00 second Genérico expiration timer to (Last created unit)
            • Otros: Acciones
wc3 in spanish sorry :/
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I can't really understand where the problem is. Are you trying to make a channeling spell?
Basically I just don't understand spanish, so it's a good idea to tell how the spell is supposed to behave(why do you need a triggered cooldown?)
 
Level 6
Joined
Jul 26, 2010
Messages
167
what my spell does is that when u click a taget a point, it creates the efect that a shoot is being charged. It keeps like that for 3 secons and them release the blast. I dont want a cooldown what I want is make the unit stay in the same casting spot while it charges, and without attacking. And yes is most like a chaneling spell.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
In that case I would do it like this:

Base the ability on channel.
Set casting time to more than 0.

In the trigger just use "Unit starts the effect of an ability"
Then the spell effect won't start when you start casting, but when the casting time is over.

For the graphical effect you can use "Unit starts casting an ability" and then just remove the effect after some time.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Can this spell be cancelled by Player by forcing the unit to stop or interrupt the Channeling ?
Or the unit just ignore any other order from Player until the spell finished casting OR being stunned, etc ?

What do you meant by this;
I dont want a cooldown what I want is make the unit stay in the same casting spot while it charges, and without attacking
Channeling spell by default, forces you to not do anything else except channel that spell until it's done.
 
Status
Not open for further replies.
Top