1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  3. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  4. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  5. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  6. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  7. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  8. 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

Fire Ward v1.07.w3x
Variables
Fire Ward
Initialization Fire Ward
Fire Ward
Fire Ward Shoot
Fire Ward (Documentation)
Documentation
Initialization Fire Ward Documentation
Fire Ward Documentation
Fire Ward Shoot Documentation

		
Name Type Is Array Initial Value
FW_Cast_Duration integer Yes
FW_Cast_Id integer No
FW_Cast_Level integer Yes
FW_Loop integer No
FW_Loop_Number integer No
FW_Point location No
FW_Target_Location location Yes
FW_Ward_Group group Yes
Initialization Fire Ward
  Events
    Map initialization
  Conditions
  Actions
    Set VariableSet FW_Point = (Center of (Playable map area))
    Unit - Create 1.Fire Ward for Neutral Passive at FW_Point facing Default building facing degrees
    Unit - Add Fire Ward (Ward Ability) to (Last created unit)
    Special Effect - Create a special effect attached to the origin (attachpoint) of (Last created unit) using Abilities\Spells\Other\BreathOfFire\BreathOfFireMissile.mdl
    Special Effect - Destroy (Last created special effect)
    Unit - Remove (Last created unit) from the game
    Custom script: call RemoveLocation(udg_FW_Point)
    Custom script: call DestroyGroup( udg_FW_Ward_Group[0] )
    Custom script: call DestroyGroup( udg_FW_Ward_Group[1] )
    Custom script: set udg_FW_Ward_Group[0] = null
    Custom script: set udg_FW_Ward_Group[1] = null
Fire Ward
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Fire Ward
  Actions
    Set VariableSet FW_Target_Location[FW_Cast_Id] = (Target point of ability being cast)
    Set VariableSet FW_Cast_Level[FW_Cast_Id] = (Level of (Ability being cast) for (Triggering unit))
    Set VariableSet FW_Cast_Duration[FW_Cast_Id] = FW_Cast_Level[FW_Cast_Id]
    Custom script: set udg_FW_Ward_Group[udg_FW_Cast_Id] = CreateGroup()
    Set VariableSet FW_Loop_Number = 5
    For each (Integer FW_Loop) from 1 to FW_Loop_Number, do (Actions)
      Loop - Actions
        Set VariableSet FW_Point = (FW_Target_Location[FW_Cast_Id] offset by 500.00 towards (72.00 x (Real(FW_Loop))) degrees.)
        Unit - Create 1 Fire Ward for (Owner of (Triggering unit)) at FW_Point facing FW_Target_Location[FW_Cast_Id]
        Unit - Add a ((Real(FW_Cast_Duration[FW_Cast_Id])) + 0.25) second Generic expiration timer to (Last created unit)
        Unit - Add Fire Ward (Ward Ability) to (Last created unit)
        Unit - Order (Last created unit) to Neutral Brewmaster - Breath Of Fire.FW_Target_Location[FW_Cast_Id]
        Unit Group - Add (Last created unit) to FW_Ward_Group[FW_Cast_Id]
        Custom script: call RemoveLocation(udg_FW_Point)
    If (FW_Cast_Id Equal to 0) then do (Turn on Fire_Ward_Shoot <gen>) else do (Do nothing)
    Set VariableSet FW_Cast_Id = (FW_Cast_Id + 1)
Fire Ward Shoot
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    For each (Integer FW_Loop) from 0 to (FW_Cast_Id - 1), do (Actions)
      Loop - Actions
        Unit Group - Pick every unit in FW_Ward_Group[FW_Loop] and do (Actions)
          Loop - Actions
            Unit - Order (Picked unit) to Neutral Brewmaster - Breath Of Fire.FW_Target_Location[FW_Loop]
        Set VariableSet FW_Cast_Duration[FW_Loop] = (FW_Cast_Duration[FW_Loop] - 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            FW_Cast_Duration[FW_Loop] Equal to 0
          Then - Actions
            Custom script: call DestroyGroup(udg_FW_Ward_Group[udg_FW_Loop])
            Custom script: call RemoveLocation(udg_FW_Target_Location[udg_FW_Loop])
            Set VariableSet FW_Cast_Id = (FW_Cast_Id - 1)
            Set VariableSet FW_Cast_Duration[FW_Loop] = FW_Cast_Duration[FW_Cast_Id]
            Set VariableSet FW_Ward_Group[FW_Loop] = FW_Ward_Group[FW_Cast_Id]
            Set VariableSet FW_Target_Location[FW_Loop] = FW_Target_Location[FW_Cast_Id]
            Custom script: set udg_FW_Ward_Group[udg_FW_Cast_Id] = null
            Custom script: set udg_FW_Target_Location[udg_FW_Cast_Id] = null
            If (FW_Cast_Id Equal to 0) then do (Turn off (This trigger)) else do (Do nothing)
          Else - Actions
This is the documentation that you need to read and understand it before you import the spell into your map.

1) There is 1 unit you need to copy and paste into your map in order for the spell to work.

-==Unit Name==-

Fire Ward

2) Copy 2 ability into your map in order for the spell to work.

-==Ability Name==-

Fire Ward
Fire Ward (Ward Ability)

3) Copy buff into your map in order for it to show a proper buff.

-==Buff Name==-

Fire Ward

4) Fire Ward ability buff set to Fire Wand instead of leaving it to Breath of Fire or Unknown

5) Copy the Fire Ward category into your map, make sure you have enable "Auto create unknown variable while pasting trigger data".

Notice

1) Increase the cooldown of the spell, the spell cooldown was currently set at 10 seconds just to enable user to view the spell.

2) You can adjust the amount of ward you want, but do not over do it.

If you use this spell in your map, remember to credit me. Have a nice day. :)

Special thanks to

-BerZeKeR- - Showing a efficient maths coding.
Kingz - Pointing a requirement for a condition.
xxdingo93xx - Advise in code optimize.
Dark Dragon - For fully reconstruct the entire spell to be fully MUI instead of semi MUI.
Initialization Fire Ward Documentation
  Events
    Map initialization
  Conditions
  Actions
    -------- Preload files --------
    Set VariableSet FW_Point = (Center of (Playable map area))
    Unit - Create 1.Fire Ward for Neutral Passive at FW_Point facing Default building facing degrees
    Unit - Add Fire Ward (Ward Ability) to (Last created unit)
    Special Effect - Create a special effect attached to the origin (attachpoint) of (Last created unit) using Abilities\Spells\Other\BreathOfFire\BreathOfFireMissile.mdl
    Special Effect - Destroy (Last created special effect)
    Unit - Remove (Last created unit) from the game
    Custom script: call RemoveLocation(udg_FW_Point)
    -------- Reset allocated memory --------
    Custom script: call DestroyGroup( udg_FW_Ward_Group[0] )
    Custom script: call DestroyGroup( udg_FW_Ward_Group[1] )
    Custom script: set udg_FW_Ward_Group[0] = null
    Custom script: set udg_FW_Ward_Group[1] = null
Fire Ward Documentation
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Fire Ward
  Actions
    -------- Setup cast variables --------
    Set VariableSet FW_Target_Location[FW_Cast_Id] = (Target point of ability being cast)
    Set VariableSet FW_Cast_Level[FW_Cast_Id] = (Level of (Ability being cast) for (Triggering unit))
    Set VariableSet FW_Cast_Duration[FW_Cast_Id] = FW_Cast_Level[FW_Cast_Id]
    -------- Allocate new group for this cast --------
    Custom script: set udg_FW_Ward_Group[udg_FW_Cast_Id] = CreateGroup()
    -------- Create how many ward at here. --------
    Set VariableSet FW_Loop_Number = 5
    For each (Integer FW_Loop) from 1 to FW_Loop_Number, do (Actions)
      Loop - Actions
        -------- Create dummy units and order it to attack. --------
        Set VariableSet FW_Point = (FW_Target_Location[FW_Cast_Id] offset by 500.00 towards (72.00 x (Real(FW_Loop))) degrees.)
        Unit - Create 1 Fire Ward for (Owner of (Triggering unit)) at FW_Point facing FW_Target_Location[FW_Cast_Id]
        Unit - Add a ((Real(FW_Cast_Duration[FW_Cast_Id])) + 0.25) second Generic expiration timer to (Last created unit)
        Unit - Add Fire Ward (Ward Ability) to (Last created unit)
        Unit - Order (Last created unit) to Neutral Brewmaster - Breath Of Fire.FW_Target_Location[FW_Cast_Id]
        Unit Group - Add (Last created unit) to FW_Ward_Group[FW_Cast_Id]
        Custom script: call RemoveLocation(udg_FW_Point)
    -------- If this is first cast then enable loop trigger --------
    If (FW_Cast_Id Equal to 0) then do (Turn on Fire_Ward_Shoot <gen>) else do (Do nothing)
    -------- Generate next MUI id --------
    Set VariableSet FW_Cast_Id = (FW_Cast_Id + 1)
Fire Ward Shoot Documentation
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    -------- Perform actions for all casts --------
    For each (Integer FW_Loop) from 0 to (FW_Cast_Id - 1), do (Actions)
      Loop - Actions
        -------- Do actions for each unit in group --------
        Unit Group - Pick every unit in FW_Ward_Group[FW_Loop] and do (Actions)
          Loop - Actions
            Unit - Order (Picked unit) to Neutral Brewmaster - Breath Of Fire.FW_Target_Location[FW_Loop]
        -------- Reduce duration by 1 second --------
        Set VariableSet FW_Cast_Duration[FW_Loop] = (FW_Cast_Duration[FW_Loop] - 1)
        -------- If this is last loop then clear memory --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            FW_Cast_Duration[FW_Loop] Equal to 0
          Then - Actions
            -------- Clear current cast memory --------
            Custom script: call DestroyGroup(udg_FW_Ward_Group[udg_FW_Loop])
            Custom script: call RemoveLocation(udg_FW_Target_Location[udg_FW_Loop])
            -------- Onc cast is down so reduce Cast Id --------
            Set VariableSet FW_Cast_Id = (FW_Cast_Id - 1)
            -------- Swap values --------
            Set VariableSet FW_Cast_Duration[FW_Loop] = FW_Cast_Duration[FW_Cast_Id]
            Set VariableSet FW_Ward_Group[FW_Loop] = FW_Ward_Group[FW_Cast_Id]
            Set VariableSet FW_Target_Location[FW_Loop] = FW_Target_Location[FW_Cast_Id]
            -------- Clear last cast values (free memory) --------
            Custom script: set udg_FW_Ward_Group[udg_FW_Cast_Id] = null
            Custom script: set udg_FW_Target_Location[udg_FW_Cast_Id] = null
            -------- Is this last cast end? turn off this trigger --------
            If (FW_Cast_Id Equal to 0) then do (Turn off (This trigger)) else do (Do nothing)
          Else - Actions