• 🏆 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] Slight problem with trigger

Status
Not open for further replies.
Level 17
Joined
Jun 17, 2010
Messages
2,275
Im not entirely sure which one is wrong, but my guess would be the middle one.
  • Initial
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blade Strike
    • Actions
      • -------- I went ahead and made a variable for all the settings so you can easily change it --------
      • Set Caster_Index = (Caster_Index + 1)
      • Set BS_Caster[Caster_Index] = (Triggering unit)
      • Set BS_Damage = 215.00
      • Set Stun_Time = 1.00
      • Set BS_Boolean[Caster_Index] = True
  • Periodic Event
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set BS_Timer[Caster_Index] = (BS_Timer[Caster_Index] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BS_Boolean[Caster_Index] Equal to True
        • Then - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 700.00 of (Position of BS_Caster[Caster_Index]) matching (((Owner of (Picked unit)) is an enemy of (Owner of BS_Caster[Caster_Index])) Equal to True)) and do (Actions)
            • Loop - Actions
              • Set BS_RandomUnit[Caster_Index] = (Random unit from (Last created unit group))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BS_RandomUnit[Caster_Index] Equal to No unit
                • Then - Actions
                • Else - Actions
                  • Set BS_PointOfCaster[Caster_Index] = (Position of BS_Caster[Caster_Index])
                  • Set BS_PointOfEnemy[Caster_Index] = (Position of BS_RandomUnit[Caster_Index])
                  • Unit - Create 1 BS Dummy Unit (Storm Crow Form) for (Owner of BS_Caster[Caster_Index]) at BS_PointOfCaster[Caster_Index] facing Default building facing degrees
                  • Unit - Order (Last created unit) to Move To BS_PointOfEnemy[Caster_Index]
                  • Trigger - Add to Damage <gen> the event (Unit - A unit comes within 120.00 of BS_RandomUnit[Caster_Index])
          • Custom script: call RemoveLocation(udg_BS_PointOfCaster[(udg_Caster_Index)])
          • Custom script: call RemoveLocation(udg_BS_PointOfEnemy[(udg_Caster_Index)])
        • Else - Actions
  • Damage
    • Events
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to BS Dummy Unit (Storm Crow Form)
    • Actions
      • Unit - Remove (Triggering unit) from the game
      • Unit - Cause BS_Caster[Caster_Index] to damage BS_RandomUnit[Caster_Index], dealing BS_Damage damage of attack type Spells and damage type Normal
      • For each (Integer A) from 1 to Caster_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BS_Timer[(Integer A)] Equal to 8
            • Then - Actions
              • Set BS_Timer[(Integer A)] = 0
            • Else - Actions
      • Set Caster_Index = (Caster_Index - 1)
      • Set BS_Boolean[Caster_Index] = False
 
Level 5
Joined
Nov 30, 2010
Messages
184
In the second trigger, the point variable BS_PointOfCaster was used before it was set. This causes you second if/then/else in the second trigger (the one thats condition is if BS_RandomUnit is equal to no unit) to do its then action which is... Nothing and this will cause the else action to not activate and nothing will happen.

Also, the third trigger doesn't know who the triggering units is and nothing will happen.

Overall, nothing much happens.

Also, what is the spell suppose to do?
 
Last edited:
Level 17
Joined
Jun 17, 2010
Messages
2,275
its saying if randomunit is no unit, then do nothing. But if randomunit is a unit, then do else. And i dont see where u see how i used the point before it was set? i set it before i used it.

And triggering unit refers to the added event unit comes within range, the unit is the triggering unit.
 
Status
Not open for further replies.
Top