How to detect when a Xel'naga tower is activated?

Monsterous

In the Shadows, Lurking.
Reaction score
99
Well since the xel'naga tower is activated when a ground unit goes near it, just do this.

Event: Unit is in Range of Xelnaga Tower
Condition: Triggering Unit = 0.5 range of Xelnaga Tower
Triggering Unit = Ground

(something along those lines)
 

Adovid

New Member
Reaction score
2
Xel'Naga tower has ability: (tower capture).

Just check for a unit to use that ability.

[edit: ehh, seems to have complications doing it this way for some reason :(. Just do it Monsterous' way if you don't know how to mess with ability commands and the data editor.]
 

FrozenShadow

I am a WolfieeifloW fan.
Reaction score
75
Yes, but if an opponent goes to a Xel'Naga tower, while it is controlled by someone else, it will deactivate. So, I'll try out Adovid's way first.

EDIT:

What do you guys think of this trigger? So far it's working pretty well for me, if you can find something else that I missed perhaps, that might cause an exploit, please tell me, thank you!

If it is flawless, also tell me, cause I don't think I can rest until I'm sure that my map is through all the typical triggers. :D

Explanation: There are two turrets, they should be able to be controlled as if it were a Xel'Naga tower, I made a way in which it returns to being owned by Neutral (0) once the last triggering unit dies, but it cannot be deactivated as the Xel'Naga tower would be when two units owned by different players both go near it, I am fine with that. I just need to know if there is a way in which someone can exploit this.

Activate Turret #1
Trigger:
  • Events
    • Unit - Any Unit Enters a distance of 2.5 from Raider Turret [20.00, 32.00]
    • Local Variables
    • Conditions
      • (Owner of (Triggering unit)) != 0
      • (Owner of Raider Turret [20.00, 32.00]) == 0
    • Actions
      • Variable - Set Turret Controller #1 = (Triggering unit)
      • Unit - Change ownership of Raider Turret [20.00, 32.00] to player (Owner of (Triggering unit)) and Change Color


Activate Turret #2
Trigger:
  • Events
    • Unit - Any Unit Enters a distance of 2.5 from Raider Turret [76.00, 32.00]
    • Local Variables
    • Conditions
      • (Owner of (Triggering unit)) != 0
      • (Owner of Raider Turret [76.00, 32.00]) == 0
    • Actions
      • Variable - Set Turret Controller #2 = (Triggering unit)
      • Unit - Change ownership of Raider Turret [76.00, 32.00] to player (Owner of (Triggering unit)) and Change Color


Deactivate Turret #1
Trigger:
  • Events
    • Unit - Any Unit Leaves a distance of 2.5 from Raider Turret [20.00, 32.00]
    • Local Variables
    • Conditions
      • (Owner of (Triggering unit)) != 0
      • (Owner of (Triggering unit)) == (Owner of Raider Turret [20.00, 32.00])
    • Actions
      • Variable - Set Turret Controller #1 = No Unit
      • Unit - Change ownership of Raider Turret [20.00, 32.00] to player 0 and Change Color


Deactivate Turret #2
Trigger:
  • Events
    • Unit - Any Unit Leaves a distance of 2.5 from Raider Turret [76.00, 32.00]
    • Local Variables
    • Conditions
      • (Owner of (Triggering unit)) != 0
      • (Owner of (Triggering unit)) == (Owner of Raider Turret [76.00, 32.00])
    • Actions
      • Variable - Set Turret Controller #2 = No Unit
      • Unit - Change ownership of Raider Turret [76.00, 32.00] to player 0 and Change Color


Checking Turret #1
Trigger:
  • Events
    • Unit - Any Unit dies
    • Local Variables
    • Conditions
      • (Triggering unit) == Turret Controller #1
    • Actions
      • Variable - Set Turret Controller #1 = No Unit
      • Unit - Change ownership of Raider Turret [20.00, 32.00] to player 0 and Change Color


Checking Turret #2
Trigger:
  • Events
    • Unit - Any Unit dies
    • Local Variables
    • Conditions
      • (Triggering unit) == Turret Controller #2
    • Actions
      • Variable - Set Turret Controller #2 = No Unit
      • Unit - Change ownership of Raider Turret [76.00, 32.00] to player 0 and Change Color
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
The Xel'Naga tower has a VERY simple ability. When a unit comes within range of it, it will select that unit and share sight with it. It's done via a few checked boxes by an "ability - interact" method.

It then has a power up actor that executes whenever it is in sight of another unit.

completely simple.

There are probably a few ways to go about bending it to your will; however, you will not be using one simple "ability - interact" method, as it is too simple for your need. (a unit can only "select" one unit at a time...)

You could use a periodic search ability on your xel'naga towers so that they choose all units within range every few seconds and share sight with all of them... fairly simple to accomplish.

The other way that I can think of is that you could just make ONE trigger that says:

Events: every 1 second of game time
--pick all units in (units within range of xel'naga tower1)
Actions: for each picked unit share vision... etc.

but definately get away from enter/leave triggers for each tower separately... that's just redundant and prone to bugs.
 

FrozenShadow

I am a WolfieeifloW fan.
Reaction score
75
The Xel'Naga tower has a VERY simple ability. When a unit comes within range of it, it will select that unit and share sight with it. It's done via a few checked boxes by an "ability - interact" method.

It then has a power up actor that executes whenever it is in sight of another unit.

completely simple.

There are probably a few ways to go about bending it to your will; however, you will not be using one simple "ability - interact" method, as it is too simple for your need. (a unit can only "select" one unit at a time...)

You could use a periodic search ability on your xel'naga towers so that they choose all units within range every few seconds and share sight with all of them... fairly simple to accomplish.

The other way that I can think of is that you could just make ONE trigger that says:

Events: every 1 second of game time
--pick all units in (units within range of xel'naga tower1)
Actions: for each picked unit share vision... etc.

but definately get away from enter/leave triggers for each tower separately... that's just redundant and prone to bugs.

I do not want the Pick all units as I only want it to be activated for one person, not every single unit touching it, I think this way is more fool proof. Please tell me how it is prone to bugs, in what way?
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Ok that last statement confusled the bajinxses out of me...

you want it to be active for only one person at a time... so... like it works now? I thought the idea was that if one player activated the tower then all players could see the area around the tower... if not, then you're going to have restate what you want exactly.


bugs... hmmm... off the top of my head...

well for one thing you are using "a unit leaves zone" as an action. What if the unit dies? or explodes... or is transported away from the zone with the mothership ability. You have to cover all your bases to make sure that the "leaves zone" action is going to pick up on all the various different possibilities.

Sometimes such an action might not fire correctly if several units are entering and leaving all at once. There might be small time increments that have to be obeyed for it to fire. A unit also could leave as one is entering and the entering trigger would fire right before the leaving trigger, thus there would be a unit at the xel naga, but it would be turned off. Also, you won't be able to really test for a lot of these situations because they can have a small rate of occurrence or might just not present themselves up front during your tests. Chances are, you have been testing with only a few units in a very controlled situation as it is.

Usually actions are much more simplistic than you would hope for when you first make your trigger. It's up to you to think of these things. You also don't want to have 4 triggers controlling one simple task. it gets messy.
 

FrozenShadow

I am a WolfieeifloW fan.
Reaction score
75
Ok that last statement confusled the bajinxses out of me...

you want it to be active for only one person at a time... so... like it works now? I thought the idea was that if one player activated the tower then all players could see the area around the tower... if not, then you're going to have restate what you want exactly.


bugs... hmmm... off the top of my head...

well for one thing you are using "a unit leaves zone" as an action. What if the unit dies? or explodes... or is transported away from the zone with the mothership ability. You have to cover all your bases to make sure that the "leaves zone" action is going to pick up on all the various different possibilities.

Sometimes such an action might not fire correctly if several units are entering and leaving all at once. There might be small time increments that have to be obeyed for it to fire. A unit also could leave as one is entering and the entering trigger would fire right before the leaving trigger, thus there would be a unit at the xel naga, but it would be turned off. Also, you won't be able to really test for a lot of these situations because they can have a small rate of occurrence or might just not present themselves up front during your tests. Chances are, you have been testing with only a few units in a very controlled situation as it is.

Usually actions are much more simplistic than you would hope for when you first make your trigger. It's up to you to think of these things. You also don't want to have 4 triggers controlling one simple task. it gets messy.

Yes, if you checked the 'check' trigger, then it'll deactivate it once the unit dies. Leaving counts blink, and entering counts warp in. But I won't be using recall, since this map will basically be an arena.
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Well it's kind of funky form but it will do then I suppose. I would still look into situations such as custom hero abilities warping or pushing units around via knockback or the such. There could be something that comes up later and you would just have to revisit this issue again worst case.

As long as it works, who am I to complain? Good luck with your map! ;)
 

FrozenShadow

I am a WolfieeifloW fan.
Reaction score
75
Well it's kind of funky form but it will do then I suppose. I would still look into situations such as custom hero abilities warping or pushing units around via knockback or the such. There could be something that comes up later and you would just have to revisit this issue again worst case.

As long as it works, who am I to complain? Good luck with your map! ;)

Thanks! :D

Yes, I'd probably be coding some knockbacks, but I doubt there will be any problems. As for dummy units, I'll just have to add more conditions ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top