Is there a way to check every, lets say, .01 seconds whether a unit (controlled by a certain player) is within a region? Because I'm making an income system that needs to know whether there are units controlled by a certain player in a region, and give him 100 minerals and 100 vespene every 15 seconds. Oh, and while you're helping anyway, is there a way to check if both units from player 1 and 2 are in there and they both don't get anything?
Is there a way to check every, lets say, .01 seconds whether a unit (controlled by a certain player) is within a region? Because I'm making an income system that needs to know whether there are units controlled by a certain player in a region, and give him 100 minerals and 100 vespene every 15 seconds. Oh, and while you're helping anyway, is there a way to check if both units from player 1 and 2 are in there and they both don't get anything?
@Crockeo: Go
have 2 triggers with this events: "unit enters region" and "unit leaves region"
"add triggering unit to unit group" and "remove triggering unit from unit group"
To give the units money create a trigger with the following event: "periodic event" Every 15 seconds
Then something like that:
You would want to do a
Number of units in Unit Group (convert units in region matching conditions to unit group )