• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Will this spell work?

Status
Not open for further replies.
Level 18
Joined
Dec 17, 2009
Messages
1,114
[HIDDEN="Triggers"/]Chrone Impulse
[TRIGGERS]Chrone Impulse
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Circle Impulse
Actions
Set CI_Caster[(Player number of (Owner of (Casting unit)))] = (Casting unit)
Set CI_Target[(Player number of (Owner of (Casting unit)))] = (Target unit of ability being cast)
Set CI_Player[(Player number of (Owner of (Casting unit)))] = (Owner of CI_Caster[(Player number of (Owner of (Casting unit)))])
Set CI_Point = (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
-------- Pause the units first! --------
Unit - Pause CI_Caster[(Player number of (Owner of (Casting unit)))]
Unit - Pause CI_Target[(Player number of (Owner of (Casting unit)))]
-------- The Dummies are here AND the casting effects are all here! --------
Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 90.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Unit - Add Water Impulse to (Last created unit)
Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 45.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Unit - Add Water Impulse to (Last created unit)
Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 0.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Unit - Add Water Impulse to (Last created unit)
Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 135.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Unit - Add Water Impulse to (Last created unit)
Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 180.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Unit - Add Water Impulse to (Last created unit)
Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 225.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Unit - Add Water Impulse to (Last created unit)
Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 270.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Unit - Add Water Impulse to (Last created unit)
Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
-------- Unpause it --------
Unit - Unpause CI_Caster[(Player number of (Owner of (Casting unit)))]
Unit - Unpause CI_Target[(Player number of (Owner of (Casting unit)))]
-------- Null it --------
Custom script: call RemoveLocation( udg_CI_Point )
Set CI_Caster[(Player number of (Owner of (Casting unit)))] = No unit
Set CI_Target[(Player number of (Owner of (Casting unit)))] = No unit
[/TRIGGERS]
[/HIDDEN]
 
Last edited:
Level 9
Joined
Jan 3, 2010
Messages
359
I help you :D


  • Chrone Impulse
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Circle Impulse
  • Actions
  • Set CI_Caster[(Player number of (Owner of (Casting unit)))] = (Casting unit)
  • Set CI_Target[(Player number of (Owner of (Casting unit)))] = (Target unit of ability being cast)
  • Set CI_Player[(Player number of (Owner of (Casting unit)))] = (Owner of CI_Caster[(Player number of (Owner of (Casting unit)))])
  • -------- Pause the units first! --------
  • Unit - Pause CI_Caster[(Player number of (Owner of (Casting unit)))]
  • Unit - Pause CI_Target[(Player number of (Owner of (Casting unit)))]
  • -------- The Dummies are here AND the casting effects are all here! --------
  • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at ((Position of CI_Target[(Player number of (Owner of (Casting unit)))]) offset by 650.00 towards 90.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Unit - Add Water Impulse to (Last created unit)
  • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
  • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at ((Position of CI_Target[(Player number of (Owner of (Casting unit)))]) offset by 650.00 towards 45.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Unit - Add Water Impulse to (Last created unit)
  • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
  • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at ((Position of CI_Target[(Player number of (Owner of (Casting unit)))]) offset by 650.00 towards 0.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Unit - Add Water Impulse to (Last created unit)
  • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
  • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at ((Position of CI_Target[(Player number of (Owner of (Casting unit)))]) offset by 650.00 towards 135.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Unit - Add Water Impulse to (Last created unit)
  • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
  • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at ((Position of CI_Target[(Player number of (Owner of (Casting unit)))]) offset by 650.00 towards 180.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Unit - Add Water Impulse to (Last created unit)
  • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
  • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at ((Position of CI_Target[(Player number of (Owner of (Casting unit)))]) offset by 650.00 towards 225.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Unit - Add Water Impulse to (Last created unit)
  • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
  • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at ((Position of CI_Target[(Player number of (Owner of (Casting unit)))]) offset by 650.00 towards 270.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Unit - Add Water Impulse to (Last created unit)
  • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
  • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
  • -------- Unpause it --------
  • Unit - Unpause CI_Caster[(Player number of (Owner of (Casting unit)))]
  • Unit - Unpause CI_Target[(Player number of (Owner of (Casting unit)))]
  • -------- Null it --------
  • Set CI_Caster[(Player number of (Owner of (Casting unit)))] = No unit
  • Set CI_Target[(Player number of (Owner of (Casting unit)))] = No unit
 
Ok, optimize it like this:
  • Chrone Impulse
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Circle Impulse
  • Actions
    • Set Points[1] = (Position of (Target unit of ability being cast))
    • For each (IntegerA) from 1 to 7, do (Actions)
      • Loop - Actions
        • Set Points[2] = (Points[1] offset by 650.00 towards (360/(IntegerA)))
        • Unit - Create 1 Spellcaster for (Owner of (Triggering unit)) at (Points[2]) facing (360/(IntegerA)) degrees
        • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
        • Unit - Add Water Impulse to (Last created unit)
        • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for (Triggering unit))
        • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave Points[1]
        • Custom script: call RemoveLocation (udg_Points[2])
    • Custom script: call RemoveLocation (udg_Points[1])
References:
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/
http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Level 18
Joined
Dec 17, 2009
Messages
1,114
Ok, optimize it like this:
  • Chrone Impulse
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Circle Impulse
  • Actions
    • Set Points[1] = (Position of (Target unit of ability being cast))
    • For each (IntegerA) from 1 to 7, do (Actions)
      • Loop - Actions
        • Set Points[2] = (Points[1] offset by 650.00 towards (360/(IntegerA)))
        • Unit - Create 1 Spellcaster for (Owner of (Triggering unit)) at (Points[2]) facing (360/(IntegerA)) degrees
        • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
        • Unit - Add Water Impulse to (Last created unit)
        • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for (Triggering unit))
        • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave Points[1]
        • Custom script: call RemoveLocation (udg_Points[2])
    • Custom script: call RemoveLocation (udg_Points[1])
References:
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/
http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/




How about this?

  • Chrone Impulse
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Circle Impulse
    • Actions
      • Set CI_Caster[(Player number of (Owner of (Casting unit)))] = (Casting unit)
      • Set CI_Target[(Player number of (Owner of (Casting unit)))] = (Target unit of ability being cast)
      • Set CI_Player[(Player number of (Owner of (Casting unit)))] = (Owner of CI_Caster[(Player number of (Owner of (Casting unit)))])
      • Set CI_Point = (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
      • -------- Pause the units first! --------
      • Unit - Pause CI_Caster[(Player number of (Owner of (Casting unit)))]
      • Unit - Pause CI_Target[(Player number of (Owner of (Casting unit)))]
      • -------- The Dummies are here AND the casting effects are all here! --------
      • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 90.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Water Impulse to (Last created unit)
      • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
      • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 45.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Water Impulse to (Last created unit)
      • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
      • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 0.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Water Impulse to (Last created unit)
      • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
      • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 135.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Water Impulse to (Last created unit)
      • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
      • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 180.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Water Impulse to (Last created unit)
      • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
      • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 225.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Water Impulse to (Last created unit)
      • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
      • Unit - Create 1 Spellcaster for CI_Player[(Player number of (Owner of (Casting unit)))] at (CI_Point offset by 650.00 towards 270.00 degrees) facing (Position of CI_Target[(Player number of (Owner of (Casting unit)))])
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Water Impulse to (Last created unit)
      • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[(Player number of (Owner of (Casting unit)))])
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
      • -------- Unpause it --------
      • Unit - Unpause CI_Caster[(Player number of (Owner of (Casting unit)))]
      • Unit - Unpause CI_Target[(Player number of (Owner of (Casting unit)))]
      • -------- Null it --------
      • Custom script: call RemoveLocation( udg_CI_Point )
      • Set CI_Caster[(Player number of (Owner of (Casting unit)))] = No unit
      • Set CI_Target[(Player number of (Owner of (Casting unit)))] = No unit
 
Level 18
Joined
Dec 17, 2009
Messages
1,114
Do you compare the length of my trigger with yours? All those dummy units created can be shrinked into the IntegerA loop and since I saw that this spell is uploaded, you will get it rejected for sure, using the current method of yours.



well im not comparing!!!

i just ask, will it work out? and i dont know from integerA 1-7 means what

tell me plz, (never used integerA X-X


EDIT:

If i used Integer A (For looping Right?) then the same angle will be repeateD right?

i want it to be circle so how to use Integer A for looping with these 7 angles?
 
Uzumaki.minato said:
If i used Integer A (For looping Right?) then the same angle will be repeateD right?
It will add every possible angle between 1º and 360º, up to the Integer you've added. If it's 8 (For each (IntegerA) from 1 to 8), it will devide the 360º into 8 parts, resulting a dummy spawn at 8 different locations, symmetric to a circular way.

Circular way:
  • Set Points[1] = (Position of (Target unit of ability being cast))
  • For each (IntegerA) from 1 to 7, do (Actions)
    • Loop - Actions
      • Set Points[2] = (Points[1] offset by 650.00 towards (51.40*(Real(IntegerA))))
      • Unit - Create 1 Spellcaster for (Owner of (Triggering unit)) at (Points[2]) facing (51.40*(Real(IntegerA))) degrees
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Water Impulse to (Last created unit)
      • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for (Triggering unit))
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave Points[1]
      • Custom script: call RemoveLocation (udg_Points[2])
  • Custom script: call RemoveLocation (udg_Points[1])
 
Last edited:
Level 18
Joined
Dec 17, 2009
Messages
1,114
It will add every possible angle between 1º and 360º, up to the Integer you've added. If it's 8 (For each (IntegerA) from 1 to 8), it will devide the 360º into 8 parts, resulting a dummy spawn at 8 different locations, symmetric to a circular way.

Circular way:
  • Set Points[1] = (Position of (Target unit of ability being cast))
  • For each (IntegerA) from 1 to 7, do (Actions)
    • Loop - Actions
      • Set Points[2] = (Points[1] offset by 650.00 towards (51.40*(Real(IntegerA))))
      • Unit - Create 1 Spellcaster for (Owner of (Triggering unit)) at (Points[2]) facing (45*(Real(IntegerA))) degrees
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Water Impulse to (Last created unit)
      • Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for (Triggering unit))
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave Points[1]
      • Custom script: call RemoveLocation (udg_Points[2])
  • Custom script: call RemoveLocation (udg_Points[1])


THANKYOU!!! Gonna work on those two triggers now!
 
Status
Not open for further replies.
Top