• 🏆 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!

Vulnerable/Invulnerable

Status
Not open for further replies.
Level 3
Joined
Feb 18, 2005
Messages
50
You'd want to set up the trigger with a unit variable that makes that unit invulnerable, then set up another trigger with two more unit variables (the two that you want dead). Set a condition to:
  • Unit - A unit Dies
and your actions should be something like If unit1 is dead and unit2 is dead THEN make invuln unit vulnerable ELSE do nothing

EDIT: oops forgot to paste in the triggers....

EDIT2: This is actually a pretty incomplete bit of help, but it helps me if you tell me what exactly those 2 units have to be that die. Are they specific units? Specific unit types? Any units owned by a specific player? etc.
 
Level 2
Joined
Apr 22, 2008
Messages
14
its like dota
in order for the world tree or frozen throne to be vulnerable you gotta kill the two side towers
 
Level 3
Joined
Feb 18, 2005
Messages
50
Oh that's much simpler, are they in a row like the-game-that-shall-not-be-named? Or are they both killable at the same time?

  • Events
    • Map initialization
  • Actions
    • Unit - Make Cannon Tower 0001 <gen> Invulnerable
    • Unit - Make Arcane Tower 0002 <gen> Invulnerable
Assuming the cannon tower is before the arcane tower and there is a guard tower in front of the cannon tower we can use this:

  • Events
    • Unit - Guard Tower 0000 <gen> Dies
  • Actions
    • Unit - Make Cannon Tower 0001 <gen> Vulnerable
then

  • Events
    • Unit - Cannon Tower 0001 <gen> Dies
  • Actions
    • Unit - Make Arcane Tower 0002 <gen> Vulnerable
EDIT: Obviously, you would replace the towers I put in the triggers with the towers in yours. To do this, you when making the trigger you would click the box that says "Select Unit" and click the tower on the map specificly. You would need to make 2 sets of these triggers per lane (or lane equivolent)
 
Level 2
Joined
Apr 22, 2008
Messages
14
alright thanks a lot

{EDIT}
so like theres a main structure
and theres 2 side structures
how do i make it so that both of the structures have to die instead of just one
 
Last edited by a moderator:
Level 3
Joined
Feb 18, 2005
Messages
50
Okay you'd want:
  • Events
    • Map initialization
  • Actions
    • Unit - Make Arcane Tower 0002 <gen> Invulnerable
Then you'd want to have a variable set, in this case I named mine invuln. You'd want this variable to be an integer with a default value of 0. Check off array and make it size equal to the number of lanes you have. For this example I'm assuming three.
Next make two more triggers:

  • Events
    • Unit - Guard Tower 0000 <gen> Dies
  • Actions
    • Set invuln[0] = (invuln + 1)
and

  • Events
    • Unit - Cannon Tower 0001 <gen> Dies
  • Actions
    • invuln[0] = (invuln + 1)
finally you'd want another trigger:

  • Events
    • Unit - A unit Dies
  • Conditions
    • invuln[0] Equal to 2
  • Actions
    • Unit - Make Arcane Tower 0002 <gen> Vulnerable
Now.. this only works for one path, so you'd repeat these triggers for each path increasing the array value [bracketed number] by one for each lane.

NOTE: Integer arrays start counting at 0, so an integer size 3 has the values 0-2.

If you only have 1 group of towers, just set it to a normal integer and ignore the array thing, it will work just fine.
 
Status
Not open for further replies.
Top