• 🏆 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] Boss AI Trigger

Status
Not open for further replies.
Level 6
Joined
Jan 2, 2015
Messages
171
i want to make boss to cast spell in order but it seems i got problem when boss enter phase 2. boss just doing nothing while attacked.

  • intial
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Trigger - Turn off Titan Phase 2 <gen>
  • Turnon phse 2
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
      • (Life of Primal Titan 0393 <gen>) Less than or equal to 6000.00
      • (Life of Primal Titan 0393 <gen>) Greater than or equal to 100.00
    • Actions
      • Trigger - Turn on Titan Phase 2 <gen>
  • Titan Phase 1
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Primal Titan
    • Actions
      • Unit - Order (Attacking unit) to Night Elf Mountain Giant - Taunt
      • Wait 3.00 game-time seconds
      • Set Temp_Location = (Position of (Attacking unit))
      • Set Temp_Group = (Units within 300.00 of Temp_Location matching (((((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True) and (((Matching unit) is A flying unit) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit
      • Unit Group - Pick every unit in (Random 1 units from Temp_Group) and do (Actions)
        • Loop - Actions
          • Custom script: call RemoveLocation(udg_Temp_Location)
          • Set Temp_Location = (Position of (Picked unit))
          • Unit - Order (Attacking unit) to Undead Crypt Lord - Impale Temp_Location
      • Custom script: call DestroyGroup(udg_Temp_Group)
      • Custom script: call RemoveLocation(udg_Temp_Location)
      • Wait 3.00 game-time seconds
      • Set Temp_Location = (Position of (Attacking unit))
      • Set Temp_Group = (Units within 300.00 of Temp_Location matching (((((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True) and (((Matching unit) is A flying unit) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit
      • Unit Group - Pick every unit in (Random 1 units from Temp_Group) and do (Actions)
        • Loop - Actions
          • Set Temp_Location = (Position of (Picked unit))
          • Unit - Order (Attacking unit) to Human Mountain King - Storm Bolt (Picked unit)
      • Custom script: call DestroyGroup(udg_Temp_Group)
      • Custom script: call RemoveLocation(udg_Temp_Location)
      • Wait 3.00 game-time seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units within 250.00 of (Position of Primal Titan 0393 <gen>))) Greater than or equal to 2
        • Then - Actions
          • Unit - Order (Attacking unit) to Orc Tauren Chieftain - War Stomp
        • Else - Actions
  • Titan Phase 2
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Primal Titan
    • Actions
      • Unit - Order (Attacking unit) to Night Elf Mountain Giant - Taunt
      • Set Temp_Location = (Position of (Attacking unit))
      • Set Temp_Group = (Units within 300.00 of Temp_Location matching (((((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True) and (((Matching unit) is A flying unit) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit
      • Unit Group - Pick every unit in (Random 1 units from Temp_Group) and do (Actions)
        • Loop - Actions
          • Set Temp_Location = (Position of (Picked unit))
          • Unit - Order (Attacking unit) to Undead Crypt Lord - Impale Temp_Location
      • Custom script: call DestroyGroup(udg_Temp_Group)
      • Custom script: call RemoveLocation(udg_Temp_Location)
      • Set Temp_Location = (Position of (Attacking unit))
      • Set Temp_Group = (Units within 300.00 of Temp_Location matching (((((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True) and (((Matching unit) is A flying unit) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit
      • Unit Group - Pick every unit in (Random 1 units from Temp_Group) and do (Actions)
        • Loop - Actions
          • Set Temp_Location = (Position of (Picked unit))
          • Unit - Order (Attacking unit) to Human Mountain King - Storm Bolt (Picked unit)
      • Custom script: call DestroyGroup(udg_Temp_Group)
      • Custom script: call RemoveLocation(udg_Temp_Location)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units within 250.00 of (Position of Primal Titan 0393 <gen>))) Greater than or equal to 2
        • Then - Actions
          • Unit - Order (Attacking unit) to Orc Tauren Chieftain - War Stomp
        • Else - Actions
can someone help me to correct this? is using "wait game time" right thing to do? so boss not so overpowered and give the player chance to recover from spell
 
Level 10
Joined
Apr 4, 2010
Messages
509
Instead of Attacking Unit, it should be Attacked Unit. <- Ignore that
Also you should add a Boolean Switch so the trigger doesn't overlap.

  • Conditions
  • (Unit-type of (Attacking unit)) Equal to Primal Titan
  • (Boolean Switch) Equal to False
  • Actions
  • Set Boolean Switch to True
  • Unit - Order (Attacking unit) to Night Elf Mountain Giant - Taunt
 
Last edited:
Level 6
Joined
Jan 2, 2015
Messages
171
You are trying to force him to so commands too quickly. That trigger runs in a literal instant, so unless you set the cast time and cast backswing to 0, it's going to take him a while to cast each ability.

what should i do to make him do the commands in right order? if i set the backswing to 0..it will affect his animation..
 
Status
Not open for further replies.
Top