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.
  • jonas jonas:
    Is the school system in your country similar to Chinese school system? I could never imagine being a teacher in a Chinese school, what's expected of students and teachers is just so different from what I'd be looking for as a teacher
  • vypur85 vypur85:
    A Levels is based on the UK syllabus offered internationally. So the syllabus is similar throughout different countries, taught in english.
  • vypur85 vypur85:
    I can't speak or write or read much chinese... Too difficult....... Which also makes my life here in china a lil difficult.
  • jonas jonas:
    Oh, I see. I thought Chinese version of A-levels :D
  • jonas jonas:
    I've been using the translate app a lot on my phone. take a photo, translate. take another photo, translate again :D
  • jonas jonas:
    it also has voice translation, my colleagues sometimes use that
  • jonas jonas:
    You came during the 0 covid policy right? How'd you get through quarantine? Did you have some help with the apps and green codes?
  • tom_mai78101 tom_mai78101:
    If you have any Chinese you need help with, let me know.
    +1
  • vypur85 vypur85:
    @jonas Those were the things I did too. Translate app and VPN are always the most important things to have to survive. Lol.
  • vypur85 vypur85:
    Yea I came last year. I was quarantined for about 30 days. Fml. The first day of my quarantine was the eve of Chinese new year last year. Fml again... Lol.
  • vypur85 vypur85:
    @tom_mai78101 IIRC you're from Taiwan right.
  • The Helper The Helper:
    I thought China had cracked down on having any foreign teachers?
  • vypur85 vypur85:
    Yeah I've heard of the news before. My school is still actively hiring foreign teachers. Not sure how things work now.
  • The Helper The Helper:
    yeah it is hard to get reliable information about that kind of stuff
  • The Helper The Helper:
    but you are doing it so it is still doable
  • vypur85 vypur85:
    I think it doesn't affect existing foreign teachers. Then again, its still weird that my school is hiring.
  • The Helper The Helper:
    Happy Monday people hope everyone has a fantastic week!
  • Ghan Ghan:
    Happy Monday?! That's a contradiction.
  • jonas jonas:
  • jonas jonas:
    please put this in the news section, it's crazy
  • tom_mai78101 tom_mai78101:
    Technically, you can post in the Headline News. Just posted your news there.
  • tom_mai78101 tom_mai78101:
    I'm not aware of you not being able to post news.
  • jonas jonas:
    I think technically I can I just forget how
    +1
  • The Helper The Helper:
    Happy Thursday!

    The Helper Discord

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top