Invulnerable

Jonny-Reaper

Active Member
Reaction score
0
I have 3 watch towers defending 2 buildings which are invulnerable and when all 3 towers are destroyed the 2 buildings become vulnerable. but the problem is when any 1 of the towers is destroyed the buildings become vulnerable, i want all 3 to be destroyed before the buildings become vulnerable, i'll post my trigger

Trigger 1
Invulnerable
Events
Time - Elapsed game time is 0.05 seconds
Conditions
Actions
Unit - Make Barracks 0007 <gen> Invulnerable
Unit - Make Fortress 0078 <gen> Invulnerable

Trigger 2
Vulnerable
Events
Unit - Watch Tower 0091 <gen> Dies
Unit - Watch Tower 0092 <gen> Dies
Unit - Watch Tower 0093 <gen> Dies
Conditions
Actions
Unit - Make Barracks 0007 <gen> Vulnerable
Unit - Make Fortress 0078 <gen> Vulnerable
 

canons200

New Member
Reaction score
50
you can use bealoon or integer to track, if watch tower 1 down, set integer to integer +1, and when integer = 3, set your building vulnerable
 

chobibo

Level 1 Crypt Lord
Reaction score
48
Trigger:
  • Test
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Tower[1] is dead) Equal to True
      • (Tower[2] is dead) Equal to True
      • (Tower[3] is dead) Equal to True
    • Actions
      • Unit - Make Fortress Vulnerable
      • Unit - Make Barracks Vulnerable
 

viktorpapa

New Member
Reaction score
2
If you put multiple events in a trigger that means it will run if any of those event happens.

try this:

Code:
Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to Watch Tower
    Actions
        Set count = (count + 1)

Code:
Events
        Game - count becomes Equal to 3.00
    Conditions
    Actions
        Unit - Make Barracks 0007 <gen> Vulnerable
        Unit - Make Fortress 0078 <gen> Vulnerable
 

Jonny-Reaper

Active Member
Reaction score
0
that would work but i have more than 3 watch towers all over the map, it has to be 3 particular watch towers
 

Happy

Well-Known Member
Reaction score
71
check whether a watch tower dies...if so set CHECKINTEGER[PlayerNumber of Owner]= CHECKINTEGER[PlayerNumber of Owner] +1 ...
then check every 0.05 seconds i would say whether a CHECKINTEGER = 3 (i would do it with integer A) and if so make the barracks & the Fortress of the player vurnable.
 

viktorpapa

New Member
Reaction score
2
give some kind of classification for those particular watchtowers, like ancient or summoned, then add a condition about it to the counter.

Code:
        ((Triggering unit) is An Ancient) Equal to True
 

0WN3D

New Member
Reaction score
15
or use unit specific event ... When a specific unit dies and in combitnation with the above solutions...
 

Jonny-Reaper

Active Member
Reaction score
0
I've tried all of the suggestions, but i still can't get it to work, i have 3 towers, they get destroyed and 2buildings become vulnerable,but i cant get a trigger or triggers to do that,
 

viktorpapa

New Member
Reaction score
2
its such an easy task, if you cant sort out with the solutions above maybe world editor is not for you.
 

hopy

Active Member
Reaction score
64
Trigger:
  • Invulnerable
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Make Barracks 0007 &lt;gen&gt; Invulnerable
      • Unit - Make Fortress 0078 &lt;gen&gt; Invulnerable
      • Set Tower[1] = Watch Tower001 &lt;gen&gt;
      • Set Tower[2] = Watch Tower002 &lt;gen&gt;
      • Set Tower[3] = Watch Tower003 &lt;gen&gt;
Trigger:
  • Test
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit type of (Triggering Unit)) equal to Watch Tower
      • (Tower[1] is dead) Equal to True
      • (Tower[2] is dead) Equal to True
      • (Tower[3] is dead) Equal to True
    • Actions
      • Unit - Make Fortress Vulnerable
      • Unit - Make Barracks Vulnerable
(Eddited, 100% hand-typed though).
Try this, if it doesn't work I'm pritty sure you've done something wrong yourself, take another look at your trigger please since I'm 101% sure it should work.

You do know that 'Tower[1], Tower[2] and Tower[3] are Unit Array variables?
 

chobibo

Level 1 Crypt Lord
Reaction score
48
There's nothing wrong with my test map, it works properly. I'm using arrays because jonny needs these triggers for multiple units, and the only information he gave us is:
that would work but i have more than 3 watch towers all over the map, it has to be 3 particular watch towers
hence the need to make the triggers dynamic.

You do not need to check the unit type of the unit stored in the tower array, since the tower is already a watch tower and your already filtering for a specific unit.
 

hopy

Active Member
Reaction score
64
You do not need to check the unit type of the unit stored in the tower array, since the tower is already a watch tower and you're already filtering for a specific unit.

Though when the 3 towers are dead, you keep making the Fortress and the Barracks vulnerable everytime a Zergling dies... err I mean... Footman dies. That or disabling the trigger afther use, it's just a small detail though, nothing important.

I haven't looked at your test map, I'm sure it works and I hope Jonny is going to look at it. Basicly what I tried to do here was just to get the 2 triggers he needs, fully, with every little detail in it, in one post. As well as saying (if he's tried this already) that he should take another look at his trigger, or copie from your map ofcourse, though I think just editing them would be faster overal. :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top