• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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