• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Distance between

Status
Not open for further replies.
Level 11
Joined
Dec 5, 2009
Messages
846
Hello there i want some help with one trigger this one:

  • Events
    • Time - Every 1.00 seconds of game time
  • Actions
    • Set Temp_Unit[2] = (Target unit of ability being cast)
    • Set Temp_Point[2] = (Position of Temp_Unit[2])
    • Set Temp_Point[3] = (Position of (Last created unit))
    • Set Temp_Real = (Distance between Temp_Point[3] and Temp_Point[2])
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Temp_Real Less than or equal to 300.00
      • Then - Actions
        • Floating Text - Destroy (Last created floating text)
        • Trigger - Turn off Kamikaze Sheep <gen>
        • Set Temp_Group = (Units within 300.00 of Temp_Point[3] matching (((Matching unit) belongs to an enemy of (Owner of Temp_Unit[1])) Equal to True))
        • Unit - Remove (Last created unit) from the game
        • Special Effect - Create a special effect at Temp_Point[3] using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
        • Unit Group - Pick every unit in Temp_Group and do (Actions)
          • Loop - Actions
            • Unit - Cause Temp_Unit[1] to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
        • Custom script: call DestroyGroup(udg_Temp_Group)
        • Custom script: call RemoveLocation(udg_Temp_Point[1])
        • Custom script: call RemoveLocation(udg_Temp_Point[3])
        • Custom script: call RemoveLocation(udg_Temp_Point[2])
      • Else - Actions
It doesnt work :p plz i need fast help!
 
Level 11
Joined
Dec 5, 2009
Messages
846
This is not the only trigger that's why i remove this Temp_Point[1] and Pharaoh i don't leak that Temp_Group cuase i destroy it :p

And here is the trigger still doesn't work :angry:

  • Events
    • Time - Every 1.00 seconds of game time
  • Actions
    • Set Temp_Unit[2] = (Target unit of ability being cast)
    • Set Temp_Unit[3] = (Last created unit)
    • Set Temp_Point[2] = (Position of Temp_Unit[2])
    • Set Temp_Point[3] = (Position of Temp_Unit[3])
    • Set Temp_Real = (Distance between Temp_Point[3] and Temp_Point[2])
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Temp_Real Less than or equal to 300.00
      • Then - Actions
        • Floating Text - Destroy (Last created floating text)
        • Trigger - Turn off Kamikaze Sheep <gen>
        • Set Temp_Group = (Units within 300.00 of Temp_Point[3] matching (((Matching unit) belongs to an enemy of (Owner of Temp_Unit[1])) Equal to True))
        • Unit - Remove (Last created unit) from the game
        • Special Effect - Create a special effect at Temp_Point[3] using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
        • Unit Group - Pick every unit in Temp_Group and do (Actions)
          • Loop - Actions
            • Unit - Cause Temp_Unit[1] to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
        • Trigger - Turn on Kamme <gen>
        • Trigger - Turn off (This trigger)
      • Else - Actions
    • Custom script: call RemoveLocation(udg_Temp_Point[2])
    • Custom script: call RemoveLocation(udg_Temp_Point[3])
    • Custom script: call RemoveLocation(udg_Temp_Point[1])
    • Custom script: call DestroyGroup(udg_Temp_Group)
 
Level 11
Joined
Dec 5, 2009
Messages
846
Well it still doesn't work :p i did like this


TRIGGER 1

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Kamme
  • Actions
    • Set Temp_Unit[1] = (Casting unit)
    • Set Temp_Unit[2] = (Target unit of ability being cast)
    • Set Temp_Unit[3] = (Last created unit)
    • Set Temp_Point[1] = (Position of Temp_Unit[1])
    • Set Temp_Point[2] = (Position of Temp_Unit[2])
    • Unit - Create 1 Kamme Dummy for (Owner of Temp_Unit[1]) at Temp_Point[1] facing Temp_Real degrees
    • Unit - Make (Last created unit) face Temp_Unit[2] over 0.00 seconds
    • Trigger - Turn on Kamme loop <gen>
    • Floating Text - Create floating text that reads 3 above (Last created unit) with Z offset 0.00, using font size 35.00, color (100.00%, 20.00%, 20.00%), and 0.00% transparency
    • Floating Text - Show (Last created floating text) for (All players)
    • Unit - Order (Last created unit) to Move To Temp_Point[2]
    • Trigger - Turn on Kamme Text <gen>
    • Wait 1.00 seconds
    • Floating Text - Change text of (Last created floating text) to 2 using font size 35.00
    • Wait 1.00 seconds
    • Floating Text - Change text of (Last created floating text) to 1 using font size 35.00
    • Wait 1.00 seconds
    • Trigger - Turn off Kamme Text <gen>
    • Trigger - Turn off Kamme loop <gen>
    • Floating Text - Destroy (Last created floating text)
    • Set Temp_Point[4] = (Position of (Last created unit))
    • Set Temp_Group2 = (Units within 300.00 of Temp_Point[4] matching (((Matching unit) belongs to an enemy of (Owner of Temp_Unit[1])) Equal to True))
    • Unit - Remove (Last created unit) from the game
    • Special Effect - Create a special effect at Temp_Point[4] using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
    • Unit Group - Pick every unit in Temp_Group2 and do (Actions)
      • Loop - Actions
        • Unit - Cause Temp_Unit[1] to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
    • Custom script: call DestroyGroup(udg_Temp_Group2)
    • Custom script: call RemoveLocation(udg_Temp_Point[1])
    • Custom script: call RemoveLocation(udg_Temp_Point[2])
    • Custom script: call RemoveLocation(udg_Temp_Point[3])
    • Custom script: call RemoveLocation(udg_Temp_Point[4])

TRIGGER 2


  • Events
    • Time - Every 1.00 seconds of game time
  • Actions
    • Set Temp_Point[2] = (Position of Temp_Unit[2])
    • Set Temp_Point[3] = (Position of Temp_Unit[3])
    • Set Temp_Real = (Distance between Temp_Point[3] and Temp_Point[2])
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Temp_Real Less than or equal to 300.00
      • Then - Actions
        • Game - Display to (All players) the text: hi
        • Floating Text - Destroy (Last created floating text)
        • Trigger - Turn off Kamikaze Sheep <gen>
        • Set Temp_Group = (Units within 300.00 of Temp_Point[3] matching (((Matching unit) belongs to an enemy of (Owner of Temp_Unit[1])) Equal to True))
        • Unit - Remove (Last created unit) from the game
        • Special Effect - Create a special effect at Temp_Point[3] using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
        • Unit Group - Pick every unit in Temp_Group and do (Actions)
          • Loop - Actions
            • Unit - Cause Temp_Unit[1] to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
        • Trigger - Turn on Kamme <gen>
        • Trigger - Turn off (This trigger)
      • Else - Actions
    • Custom script: call RemoveLocation(udg_Temp_Point[2])
    • Custom script: call RemoveLocation(udg_Temp_Point[3])
    • Custom script: call RemoveLocation(udg_Temp_Point[1])
    • Custom script: call DestroyGroup(udg_Temp_Group)
What's wrong ? :p Just happens the same thing all the time.. Ty for the help!
 
Status
Not open for further replies.
Top