1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

CHAMPIONS - Direfury.w3x
Variables
Soul Distraction
SD Config
SD Effect High
SD Effect Low
SD Cast
SD Channel
Commands\
Start
Auto spawn
Revive
Mana
HP
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.

		
Name Type Is Array Initial Value
SD_Ability abilcode No
SD_AttachPoint string No
SD_Caster unit Yes
SD_ChannelTime real Yes
SD_DamageCharge real Yes
SD_Index integer No
SD_Level integer Yes
SD_Loop integer No
SD_LowHPZone real Yes
SD_Order string No
SD_SapModel string No
SD_Target unit Yes
SD_Time real Yes
SD_TimeOut real No
SD Config
  Events
    Map initialization
  Conditions
  Actions
    -------- Ability --------
    Set SD_Ability = Soul Distraction
    -------- Ability Order - make sure to match the object editor --------
    Set SD_Order = animatedead
    -------- Bond break model --------
    Set SD_SapModel = Objects\Spawnmodels\Undead\UCancelDeath\UCancelDeath.mdl
    -------- Bond break attachment --------
    Set SD_AttachPoint = origin
    -------- Channel time - make sure to set it equal to Follow Through Time in the ability --------
    Set SD_ChannelTime[1] = 5.00
    Set SD_ChannelTime[2] = 5.00
    Set SD_ChannelTime[3] = 5.00
    -------- Damage per second --------
    Set SD_DamageCharge[1] = 25.00
    Set SD_DamageCharge[2] = 50.00
    Set SD_DamageCharge[3] = 100.00
    -------- The checkpoint of low and high HP for effect bonus area (in percentage) --------
    Set SD_LowHPZone[1] = 30.00
    Set SD_LowHPZone[2] = 30.00
    Set SD_LowHPZone[3] = 30.00
    -------- You can alter the extra effect of High/Low health at the "Effect" triggers --------
    -------- END CONFIG --------
    Set SD_TimeOut = 0.03
    Trigger - Add to SD_Channel <gen> the event (Every SD_TimeOut seconds of game time)
SD Effect High
  Events
  Conditions
  Actions
    -------- DO NOT USE WAITS HERE! --------
    -------- Use SD_Caster[SD_Loop] to refer to caster --------
    -------- Use SD_Target[SD_Loop] to refer to target of the ability --------
    -------- Use SD_Level[SD_Loop] to refer to ability level --------
    Unit - Set mana of SD_Target[SD_Loop] to ((Mana of SD_Target[SD_Loop]) - (SD_DamageCharge[SD_Level[SD_Loop]] x SD_TimeOut))
SD Effect Low
  Events
  Conditions
  Actions
    -------- DO NOT USE WAITS HERE! --------
    -------- Use SD_Caster[SD_Loop] to refer to caster --------
    -------- Use SD_Target[SD_Loop] to refer to target of the ability --------
    -------- Use SD_Level[SD_Loop] to refer to ability level --------
    Unit - Cause SD_Caster[SD_Loop] to damage SD_Target[SD_Loop], dealing (SD_DamageCharge[SD_Level[SD_Loop]] x SD_TimeOut) damage of attack type Spells and damage type Normal
SD Cast
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to SD_Ability
  Actions
    Set SD_Index = (SD_Index + 1)
    Set SD_Caster[SD_Index] = (Triggering unit)
    Set SD_Target[SD_Index] = (Target unit of ability being cast)
    Set SD_Level[SD_Index] = (Level of SD_Ability for SD_Caster[SD_Index])
    Set SD_Time[SD_Index] = 0.00
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        SD_Index Equal to 1
      Then - Actions
        Trigger - Turn on SD_Channel <gen>
      Else - Actions
SD Channel
  Events
  Conditions
  Actions
    For each (Integer SD_Loop) from 1 to SD_Index, do (Actions)
      Loop - Actions
        Unit - Cause SD_Caster[SD_Loop] to damage SD_Target[SD_Loop], dealing (SD_DamageCharge[SD_Level[SD_Loop]] x SD_TimeOut) damage of attack type Spells and damage type Normal
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Life of SD_Target[SD_Loop]) Greater than or equal to SD_LowHPZone[SD_Level[SD_Loop]]
          Then - Actions
            Trigger - Run SD_Effect_High <gen> (checking conditions)
          Else - Actions
            Trigger - Run SD_Effect_Low <gen> (checking conditions)
        Special Effect - Create a special effect attached to the SD_AttachPoint of SD_Target[SD_Loop] using SD_SapModel
        Special Effect - Destroy (Last created special effect)
        Set SD_Time[SD_Loop] = (SD_Time[SD_Loop] + SD_TimeOut)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Or - Any (Conditions) are true
              Conditions
                (SD_Caster[SD_Loop] is alive) Equal to False
                (SD_Target[SD_Loop] is alive) Equal to False
                SD_Time[SD_Loop] Greater than or equal to SD_ChannelTime[SD_Level[SD_Loop]]
                (Current order of SD_Caster[SD_Loop]) Not equal to (Order(SD_Order))
          Then - Actions
            Set SD_Caster[SD_Loop] = SD_Caster[SD_Index]
            Set SD_Target[SD_Loop] = SD_Target[SD_Index]
            Set SD_Level[SD_Loop] = SD_Level[SD_Index]
            Set SD_Time[SD_Loop] = SD_Time[SD_Index]
            Set SD_Index = (SD_Index - 1)
            Set SD_Loop = (SD_Loop - 1)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                SD_Index Equal to 0
              Then - Actions
                Trigger - Turn off (This trigger)
              Else - Actions
          Else - Actions
Start
  Events
    Time - Elapsed game time is 0.00 seconds
  Conditions
  Actions
    Game - Display to (All players) the text: Type revive to revive heroType mana to restore manaType health to restore health
Auto spawn
  Events
    Time - Elapsed game time is 15.00 seconds
  Conditions
  Actions
    Unit - Create 1 (Random level -1 creep unit-type) for Player 2 (Blue) at (Random point in (Playable map area)) facing Default building facing degrees
Revive
  Events
    Player - Player 1 (Red) types a chat message containing revive as An exact match
  Conditions
  Actions
    Hero - Instantly revive Dark Knight 0000 <gen> at (Center of (Playable map area)), Hide revival graphics
    Hero - Instantly revive Dark Knight 0034 <gen> at (Center of (Playable map area)), Hide revival graphics
    Hero - Instantly revive Dark Knight 0001 <gen> at (Center of (Playable map area)), Hide revival graphics
Mana
  Events
    Player - Player 1 (Red) types a chat message containing mana as An exact match
  Conditions
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      Loop - Actions
        Unit - Set mana of (Picked unit) to 100%
HP
  Events
    Player - Player 1 (Red) types a chat message containing mana as An exact match
  Conditions
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      Loop - Actions
        Unit - Set life of (Picked unit) to 100%