• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

need help making a trigger.

Status
Not open for further replies.
Level 2
Joined
Oct 22, 2009
Messages
18
so, this trigger should do the following:
if player Blue is attacked because hes blocking, and its player 12 attacking, it waits 0.5 secs, turns off collision, goes red, and moves to "Team1 All1". 2 seconds later, it will go back to normal (and repeat if still blocked)

problem is. i want to add this in there somehow:
trigger works normal, BUT if within region "team1 antiblock" it will order them straight to "Team1 Alldie" (instead of "team1 All1").

  • Prevent block P12 red
    • Events
      • Unit - A unit owned by Player 2 (Blue) Is attacked
    • Conditions
      • (Owner of (Attacking unit)) Equal to Player 12 (Brown)
    • Actions
      • Wait 0.50 seconds
      • Unit - Turn collision for (Attacking unit) Off
      • Animation - Change (Attacking unit)'s vertex coloring to (100.00%, 0.00%, 0.00%) with 20.00% transparency
      • Unit - Order (Attacking unit) to Move To (Center of Team1 All1 <gen>)
      • Wait 2.00 seconds
      • Unit - Turn collision for (Attacking unit) On
      • Animation - Change (Attacking unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
this is about the only way i can see my TD working without abusive glitches, if this cant be done, i only have 1 backup idea im trying to avoid.

any help appreciated, thanks.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Replace the "order attacking unit..." with these:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Some region contains (Attacked unit)) Equal to True
    • Then - Actions
      • Set Temp_Loc_1 = Center of Reg1 <gen>
    • Else - Actions
      • Set Temp_Loc_1 = Center of Reg2 <gen>
  • Unit - Order (Attacking unit) to Move To Temp_Loc_1
  • Custom Script: call RemoveLocation(udg_Temp_Loc_1)
 
Status
Not open for further replies.
Top