• 🏆 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!

[Trigger] Trigger that disconnects people

Status
Not open for further replies.
Level 20
Joined
Oct 21, 2006
Messages
3,231
All people disconnect except host, when this trigger runs (second trigger). I'd like to know why. I guess it has something to do with custom scripts..

  • Add events
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Attack <gen> the event (Unit - (Picked unit) Takes damage)
  • Attack
    • Events
    • Conditions
      • DamageDetection_Disabled Equal to False
      • (Damage taken) Greater than 0.50
    • Actions
      • -------- -------------------- --------
      • -------- VARIABLES --------
      • -------- -------------------- --------
      • -------- Default colors --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DefaultColors_Disabled Equal to False
        • Then - Actions
          • Set Text_Color1 = 100.00
          • Set Text_Color2 = 100.00
          • Set Text_Color3 = 100.00
          • Set Text_Color4 = 0.00
        • Else - Actions
      • -------- Set integers --------
      • Set DamageDetection_Damage = (Integer((Damage taken)))
      • Set Dodge_Life = ((Life of (Triggering unit)) + (Damage taken))
      • -------- Set points --------
      • Set Point1 = (Position of (Attacked unit))
      • Set Point2 = (Position of (Damage source))
      • -------- -------------------------- --------
      • -------- DODGE / MISS --------
      • -------- -------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dodge_Disabled Equal to False
          • (Random real number between 0.00 and 100.00) Less than or equal to Dodge[(Player number of (Owner of (Attacked unit)))]
        • Then - Actions
          • Set Text_Size = 10.00
          • Unit - Set life of (Triggering unit) to Dodge_Life
          • -------- DODGE --------
          • Set TriggeringPlayer = (Owner of (Attacked unit))
          • -------- Special symbols --------
          • Set Text_Special1 = <Empty String>
          • Set Text_Special2 = !
          • -------- Show dodge text --------
          • Custom script: if GetLocalPlayer() == udg_TriggeringPlayer then
          • Floating Text - Create floating text that reads (Text_Special1 + (Dodge + Text_Special2)) at Point1 with Z offset 0.00, using font size Text_Size, color (Text_Color1%, Text_Color2%, Text_Color3%), and Text_Color4% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 200.00 towards (Random real number between 80.00 and 100.00) degrees
          • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Custom script: endif
          • -------- MISS --------
          • Set TriggeringPlayer = (Owner of (Damage source))
          • -------- Special symbols --------
          • Set Text_Special1 = <Empty String>
          • Set Text_Special2 = !
          • -------- Show miss text --------
          • Custom script: if GetLocalPlayer() == udg_TriggeringPlayer then
          • Floating Text - Create floating text that reads (Text_Special1 + (Miss + Text_Special2)) at Point1 with Z offset 0.00, using font size Text_Size, color (Text_Color1%, Text_Color2%, Text_Color3%), and Text_Color4% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 200.00 towards (Random real number between 80.00 and 100.00) degrees
          • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Custom script: endif
        • Else - Actions
          • -------- -------------- --------
          • -------- ATTACK --------
          • -------- -------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random real number between 0.00 and 100.00) Less than or equal to Critical[(Player number of (Owner of (Damage source)))]
            • Then - Actions
              • -------- CRITICAL --------
              • Set DamageDetection_Damage = (2 x DamageDetection_Damage)
              • Set Text_Size = 14.00
              • Set DamageDetection_Disabled = True
              • Set Dodge_Disabled = True
              • Unit - Cause (Damage source) to damage (Attacked unit), dealing (Real(DamageDetection_Damage)) damage of attack type Normal and damage type Normal
              • Set DamageDetection_Disabled = False
              • Set Dodge_Disabled = False
              • -------- DAMAGE DONE --------
              • Set TriggeringPlayer = (Owner of (Damage source))
              • -------- Special symbols --------
              • Set Text_Special1 = <Empty String>
              • Set Text_Special2 = <Empty String>
              • -------- Show damage done --------
              • Custom script: if GetLocalPlayer() == udg_TriggeringPlayer then
              • Floating Text - Create floating text that reads (Text_Special1 + ((String(DamageDetection_Damage)) + Text_Special2)) at Point1 with Z offset 0.00, using font size Text_Size, color (Text_Color1%, Text_Color2%, Text_Color3%), and Text_Color4% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 200.00 towards (Random real number between 80.00 and 100.00) degrees
              • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
              • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
              • Custom script: endif
              • -------- DAMAGE TAKEN --------
              • Set TriggeringPlayer = (Owner of (Attacked unit))
              • -------- Special symbols --------
              • Set Text_Special1 = -
              • Set Text_Special2 = <Empty String>
              • -------- Disable default colors --------
              • Set DefaultColors_Disabled = True
              • -------- Text color --------
              • Set Text_Color1 = 255.00
              • Set Text_Color2 = 0.00
              • Set Text_Color3 = 0.00
              • Set Text_Color4 = 0.00
              • -------- Show damage taken --------
              • Custom script: if GetLocalPlayer() == udg_TriggeringPlayer then
              • Floating Text - Create floating text that reads (Text_Special1 + ((String(DamageDetection_Damage)) + Text_Special2)) at Point1 with Z offset 0.00, using font size Text_Size, color (Text_Color1%, Text_Color2%, Text_Color3%), and Text_Color4% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 200.00 towards (Random real number between 80.00 and 100.00) degrees
              • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
              • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
              • Custom script: endif
              • -------- Enable default colors --------
              • Set DefaultColors_Disabled = False
              • -------- Rage system --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RageSystem_Disabled Equal to False
                  • (Unit-type of (Attacked unit)) Equal to Berserker
                • Then - Actions
                  • Unit - Set mana of (Attacked unit) to ((Mana of (Attacked unit)) + 5.00)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RageSystem_Disabled Equal to False
                  • (Unit-type of (Damage source)) Equal to Berserker
                • Then - Actions
                  • Unit - Set mana of (Damage source) to ((Mana of (Damage source)) + 15.00)
                • Else - Actions
            • Else - Actions
              • -------- NORMAL --------
              • Set Text_Size = 10.00
              • -------- DAMAGE DONE --------
              • Set TriggeringPlayer = (Owner of (Damage source))
              • -------- Special symbols --------
              • Set Text_Special1 = <Empty String>
              • Set Text_Special2 = <Empty String>
              • -------- Show damage done --------
              • Custom script: if GetLocalPlayer() == udg_TriggeringPlayer then
              • Floating Text - Create floating text that reads (Text_Special1 + ((String(DamageDetection_Damage)) + Text_Special2)) at Point1 with Z offset 0.00, using font size Text_Size, color (Text_Color1%, Text_Color2%, Text_Color3%), and Text_Color4% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 200.00 towards (Random real number between 80.00 and 100.00) degrees
              • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
              • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
              • Custom script: endif
              • -------- DAMAGE TAKEN --------
              • Set TriggeringPlayer = (Owner of (Attacked unit))
              • -------- Special symbols --------
              • Set Text_Special1 = -
              • Set Text_Special2 = <Empty String>
              • -------- Disable default colors --------
              • Set DefaultColors_Disabled = True
              • -------- Text color --------
              • Set Text_Color1 = 255.00
              • Set Text_Color2 = 0.00
              • Set Text_Color3 = 0.00
              • Set Text_Color4 = 0.00
              • -------- Show damage taken --------
              • Custom script: if GetLocalPlayer() == udg_TriggeringPlayer then
              • Floating Text - Create floating text that reads (Text_Special1 + ((String(DamageDetection_Damage)) + Text_Special2)) at Point1 with Z offset 0.00, using font size Text_Size, color (Text_Color1%, Text_Color2%, Text_Color3%), and Text_Color4% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 200.00 towards (Random real number between 80.00 and 100.00) degrees
              • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
              • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
              • Custom script: endif
              • -------- Enable default colors --------
              • Set DefaultColors_Disabled = False
              • -------- Rage system --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RageSystem_Disabled Equal to False
                  • (Unit-type of (Attacked unit)) Equal to Berserker
                • Then - Actions
                  • Unit - Set mana of (Attacked unit) to ((Mana of (Attacked unit)) + 5.00)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RageSystem_Disabled Equal to False
                  • (Unit-type of (Damage source)) Equal to Berserker
                • Then - Actions
                  • Unit - Set mana of (Damage source) to ((Mana of (Damage source)) + 10.00)
                • Else - Actions
          • -------- ----------------------------- --------
          • -------- COUNTER HELIX --------
          • -------- ----------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Attacked unit)) Equal to Berserker
              • (Random integer number between 1 and 5) Less than or equal to 1
            • Then - Actions
              • Animation - Play (Attacked unit)'s spin animation
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within 225.00 of Point1 matching ((((Matching unit) is A structure) Equal to False) and ((((Owner of (Matching unit)) is an enemy of (Owner of (Attacked unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
                • Loop - Actions
                  • -------- Disable systems --------
                  • Set Dodge_Disabled = True
                  • Set DefaultColors_Disabled = True
                  • Set RageSystem_Disabled = True
                  • -------- Text color --------
                  • Set Text_Color1 = 255.00
                  • Set Text_Color2 = 255.00
                  • Set Text_Color3 = 0.00
                  • Set Text_Color4 = 0.00
                  • -------- Damage --------
                  • Unit - Cause (Attacked unit) to damage (Picked unit), dealing (Real(Damage_CounterHelix[(Player number of (Owner of (Attacked unit)))])) damage of attack type Spells and damage type Normal
                  • -------- Special effects --------
                  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • -------- Enable systems --------
                  • Set Dodge_Disabled = False
                  • Set DefaultColors_Disabled = False
                  • Set RageSystem_Disabled = False
            • Else - Actions
      • -------- Remove memory leaks --------
      • Custom script: call RemoveLocation(udg_Point1)
      • Custom script: call RemoveLocation(udg_Point2)
 
Status
Not open for further replies.
Top