• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Killing Units on Entering - Weird Glitch.

Status
Not open for further replies.
Level 4
Joined
May 16, 2004
Messages
76
I have a trigger set up that is very simple.

First of all the background information that you need, is at one time lots of units are spawned and then sent to regions to die. All regions are equidistant but the units paths are not since they choose to go to a random point in the region.

When they get there, the trigger below is to kill them just after they enter the region. The Problem that I am having is that not all of the units get killed they just sit there in the region playing dumb. How would you fix this/ is this fixable?



Event :
Unit Enters Region A
Unit Enters Region B
Unit Enters Region C
Unit Enters Region D
Unit Enters Region E
Unit Enters Region F
Unit Enters Region G
Unit Enters Region H

Condition : UnitType is equal to Test

Action:
Wait 0.50 Seconds
Kill Entering Unit
 
Level 4
Joined
May 16, 2004
Messages
76
Ok, First i tried changing it to triggering unit, but with no luck. I then tested taking out the wait and it works fairly well, except there is still an occasional unit that gets stuck? Any other suggestions, or do you think i will have to do a check trigger to solve this eg.

Event - Every 0.10 Seconds

Action - Pick every unit of unit type [test] and in region [A,B,C,D,E,F,G,H] and do Kill [Picked Unit]
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Ok, First i tried changing it to triggering unit, but with no luck. I then tested taking out the wait and it works fairly well, except there is still an occasional unit that gets stuck? Any other suggestions, or do you think i will have to do a check trigger to solve this eg.

Event - Every 0.10 Seconds

Action - Pick every unit of unit type [test] and in region [A,B,C,D,E,F,G,H] and do Kill [Picked Unit]

That would run 10 times every seconds, so it could be laggy,,
Try the same event, but also every (lets say) 30 secs of the game, the first events should be enough, but the last would work as some debug,,
 
Level 4
Joined
May 16, 2004
Messages
76
Thanks for the help guys, but i found a better way around it, the reason the units were getting stuck is because they go to a random point in the region, if the random point is on the edge of the region, technically the game doesnt class them as entering it. So to fix this i put a tiny region infront of all the regions to use that as the kill region. :p
 
Status
Not open for further replies.
Top