That would work, but I'm making a bound like map and there are many units you can't go too near, so I think that would lag. Is there seriously no other way to do this? It seems like a simple trigger to me...
Yes, unfortunatly that is not possible to do directly through triggers.
However, as usual, there is a workaround.
Give zealots a simple search behavior, that will set off a dummy ability when a unit is detected by the search.
Simply have a trigger "unit uses ability", and have condition making sure that the triggering ability is the dummy ability set off by the zealot.
Also, you can make a longer lasting dummy ability, to avoid the need for messy "wait" conditions in your triggers. In other words, instead of setting the "at" condition to "Generic3 - Execute" you can set it to "Generic6 - Complete".
You are going to make sure that the player does not know that this ability is being used in the background. Disable all notifications and UI messages, and you should be good to go! This should generate less lag for your map as well.
No, don't do that. That will produce tons of lag. Every time a unit enters the range of ANYTHING the trigger has to check to make sure the data type is convertable, and then make sure that it is a unit. Then, after that, make sure it is a zealot. Just give the zealot the behavior I was talking about, much less lag that way.
I would recommend never messing around with using an any unit function when there is another way through the data editor, for it will cause less lag.
No it wont, it depends on the action, you can have a trigger than runs every .00625 seconds without any lag (most WASD movement systems do) at all it depends on what you want to do (actions).
One trigger with that will not cause lag. In general ,triggers like that will cause more lag than an equivalent through the data editor.
However, the difference is normally noticeable until you really start getting a lot of those triggers in one map, working at once. You always want a trigger to be triggered the least amount of times possible to get the job done the way you want it to.
There is no arguing that, it is a fact.
FYI most WASD systems lag ridiculously on lesser computers, your computer and other better computers you can't tell this though.
Well, I imitated WC3's Immolation spell and put that spell on my units with 9999 damage so it insta-kills, so that part is good.
I encountered another problem with regions though:
Event - Any unit enters (Region(Any Region)
Action - Kill (Triggering Unit)
I need help with the conditions for that event. I added all my death-regions for my bound inside a Region Array. Now I need a condition that checks if a region is inside an region array.
I tried doing this:
Event - Any unit enters (Region(Any Region)
Action:
General - Pick each integer between 1 to 10 (10 is my number of death regions), and do Action
Action:
General - If-Then-Else
Conditions: (Triggering Region) == (RegionArray[Picked Integer])
Action: Kill (Triggering Unit)
upon testing, when I send a unit to enter any region inside my RegionArray, nothing happens.
So my question is: How do I make it so that when any unit enters a region part of a region array, they die.
I think theres something wrong with my event:
Event - Any unit enters (Region(Any Region)
Action: UI - Display "Success" to All Players in Chat Area
Well, I imitated WC3's Immolation spell and put that spell on my units with 9999 damage so it insta-kills, so that part is good.
I encountered another problem with regions though:
Event - Any unit enters (Region(Any Region) Action - Kill (Triggering Unit)
I need help with the conditions for that event. I added all my death-regions for my bound inside a Region Array. Now I need a condition that checks if a region is inside an region array.
I tried doing this: Event - Any unit enters (Region(Any Region) Action: General - Pick each integer between 1 to 10 (10 is my number of death regions), and do Action Action: General - If-Then-Else Conditions: (Triggering Region) == (RegionArray[Picked Integer]) Action: Kill (Triggering Unit)
upon testing, when I send a unit to enter any region inside my RegionArray, nothing happens.
So my question is: How do I make it so that when any unit enters a region part of a region array, they die.
I think theres something wrong with my event:
Event - Any unit enters (Region(Any Region) Action: UI - Display "Success" to All Players in Chat Area
Unfortunately, that won't work. The reason is technically the entire map is region. The playable area is a region. So... it just won't work. You have got to make a trigger for each area, unless there are like, 50 of them.
If that is the case, I would recommend created an invisible unit that is completely undetectable in any way. Then give it a behavior that constantly checks for units in its radius. If a new unit is detected, it will damage that unit with the death animations being whatever you want. Just set the "kill" flag to on, and it will automatically kill any unit that comes within its range. So, essentially, a "kill zone". And, even better, you don't have to use any triggers at all! Less lag, less mess.
That will work. Are you sure it will cause less lag though? I would have to create around 100 units just for one small bound, while 10 regions will probably work the same way.
Well no, I don't think your quite getting the idea.
Think of each invisible unit as a region. Make the search effect's radius be however large you want the "region" to be. If you can't get a mental picture, put down the unit, then put down a circle region with the center being where the unit is. When you get it to be the right size, check and see what it's radius is. Then go into the search effect of that unit, and set the radius of the effect to the radius of that region. Then just delete the region. You would only need 1 unit for each "kill zone" that you want to make.
Also, you can merger regions. So you could make a bunch of regions in different areas, then merge them as one. However, I have heard that that method is unreliable and causes quite a bit of lag. You can try it though.
For whatever reason converting presets didnt work when i tested it, so i dont think you are doing anything wrong. Btw, when you use things like Playable Map Area or Entire Map in region triggers, they usually trigger when a unit is created or when the game starts.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I haven't opened the editor in a long time, so I forgot everything :(
Anyways, I need help with the [[ ]] part. I need it to work with every zealot on the map, not a single one.
Event: Any Unit Enters a distance of 1.0 from [ [ Any Zealot ] ]
Thanks <3
how about any unit enters distance from any unit but with a condition of the unit is a zealot?
@Reaper872: Go
I can't find the function Any Unit. There's nothing in Presets too
you could use a periodic event that checks to see if units are within the range you want
@TheTAZsc: Go
That would work, but I'm making a bound like map and there are many units you can't go too near, so I think that would lag. Is there seriously no other way to do this? It seems like a simple trigger to me...
@kenxftw: Go
Yes, unfortunatly that is not possible to do directly through triggers.
However, as usual, there is a workaround.
Give zealots a simple search behavior, that will set off a dummy ability when a unit is detected by the search.
Simply have a trigger "unit uses ability", and have condition making sure that the triggering ability is the dummy ability set off by the zealot.
Also, you can make a longer lasting dummy ability, to avoid the need for messy "wait" conditions in your triggers. In other words, instead of setting the "at" condition to "Generic3 - Execute" you can set it to "Generic6 - Complete".
You are going to make sure that the player does not know that this ability is being used in the background. Disable all notifications and UI messages, and you should be good to go! This should generate less lag for your map as well.
Great to be back and part of the community again!
@kenxftw: Go
What do you mean? I swear I saw an any unit or triggering unit option.
@Reaper872: Go
try what reaper said but go under conversion, convert preset to unit, then select Any Unit
@Usernameisntworkingright: Go
No, don't do that. That will produce tons of lag. Every time a unit enters the range of ANYTHING the trigger has to check to make sure the data type is convertable, and then make sure that it is a unit. Then, after that, make sure it is a zealot. Just give the zealot the behavior I was talking about, much less lag that way.
I would recommend never messing around with using an any unit function when there is another way through the data editor, for it will cause less lag.
Great to be back and part of the community again!
@TacoManStan: Go
No it wont, it depends on the action, you can have a trigger than runs every .00625 seconds without any lag (most WASD movement systems do) at all it depends on what you want to do (actions).
@Usernameisntworkingright: Go
One trigger with that will not cause lag. In general ,triggers like that will cause more lag than an equivalent through the data editor.
However, the difference is normally noticeable until you really start getting a lot of those triggers in one map, working at once. You always want a trigger to be triggered the least amount of times possible to get the job done the way you want it to.
There is no arguing that, it is a fact.
FYI most WASD systems lag ridiculously on lesser computers, your computer and other better computers you can't tell this though.
Great to be back and part of the community again!
Well, I imitated WC3's Immolation spell and put that spell on my units with 9999 damage so it insta-kills, so that part is good.
I encountered another problem with regions though:
Event - Any unit enters (Region(Any Region) Action - Kill (Triggering Unit)
I need help with the conditions for that event. I added all my death-regions for my bound inside a Region Array. Now I need a condition that checks if a region is inside an region array.
I tried doing this: Event - Any unit enters (Region(Any Region) Action: General - Pick each integer between 1 to 10 (10 is my number of death regions), and do Action Action: General - If-Then-Else Conditions: (Triggering Region) == (RegionArray[Picked Integer]) Action: Kill (Triggering Unit)
upon testing, when I send a unit to enter any region inside my RegionArray, nothing happens.
So my question is: How do I make it so that when any unit enters a region part of a region array, they die.
I think theres something wrong with my event:
Event - Any unit enters (Region(Any Region) Action: UI - Display "Success" to All Players in Chat Area
when I enter a region, nothing happens.
@kenxftw: Go
Unfortunately, that won't work. The reason is technically the entire map is region. The playable area is a region. So... it just won't work. You have got to make a trigger for each area, unless there are like, 50 of them.
If that is the case, I would recommend created an invisible unit that is completely undetectable in any way. Then give it a behavior that constantly checks for units in its radius. If a new unit is detected, it will damage that unit with the death animations being whatever you want. Just set the "kill" flag to on, and it will automatically kill any unit that comes within its range. So, essentially, a "kill zone". And, even better, you don't have to use any triggers at all! Less lag, less mess.
Great to be back and part of the community again!
@TacoManStan: Go
That will work. Are you sure it will cause less lag though? I would have to create around 100 units just for one small bound, while 10 regions will probably work the same way.
Thanks
@kenxftw: Go
Well no, I don't think your quite getting the idea.
Think of each invisible unit as a region. Make the search effect's radius be however large you want the "region" to be. If you can't get a mental picture, put down the unit, then put down a circle region with the center being where the unit is. When you get it to be the right size, check and see what it's radius is. Then go into the search effect of that unit, and set the radius of the effect to the radius of that region. Then just delete the region. You would only need 1 unit for each "kill zone" that you want to make.
Also, you can merger regions. So you could make a bunch of regions in different areas, then merge them as one. However, I have heard that that method is unreliable and causes quite a bit of lag. You can try it though.
Great to be back and part of the community again!
@TacoManStan: Go
For whatever reason converting presets didnt work when i tested it, so i dont think you are doing anything wrong. Btw, when you use things like Playable Map Area or Entire Map in region triggers, they usually trigger when a unit is created or when the game starts.