Hi, I'm trying to create a custom condition that will trigger an event if a unit remains within a certain radius of another unit. In this case a unit must remain within 1.0 (or slightly more) distance of structure for about 5 seconds in order for control to be given to the player. My question is how can I set this up, I really have no idea where to begin, I've searched the forums for answers but haven't found any. Anyways, thanks!
First, use the Event that triggers when unit is within 1 of that structure (Probably need something more than 1 to make it works as the radius of the structure and unit should be considered as well).
Then, Action: Assign a local variable to the triggering unit (and structure if necessary). Wait 5 second. Use If-Then-Else and check again whether the triggering unit (make sure you use the above unit variable here) is still within the distance from the structure.
Hi, I'm trying to create a custom condition that will trigger an event if a unit remains within a certain radius of another unit. In this case a unit must remain within 1.0 (or slightly more) distance of structure for about 5 seconds in order for control to be given to the player. My question is how can I set this up, I really have no idea where to begin, I've searched the forums for answers but haven't found any. Anyways, thanks!
First, use the Event that triggers when unit is within 1 of that structure (Probably need something more than 1 to make it works as the radius of the structure and unit should be considered as well).
Then, Action: Assign a local variable to the triggering unit (and structure if necessary). Wait 5 second. Use If-Then-Else and check again whether the triggering unit (make sure you use the above unit variable here) is still within the distance from the structure.