I know, there is not such event that does exactly cover this event. But how could it be substituted?
I am spawning in random point all over the map several nydus worms. As long as the worm is not spotted by the player it should send its squads to the center of the map and then to any base of the player. This should disguise the position of the worm for some time. After it is spotted it can send its troops directly to the destination point.
If a worm is killed it will respawn at a different position. Again hiding its troops path.
There is an event like this:
Unit - Any Unit Enters a distance of X from Unit
But this would fire too often.
There is also a condition of
((Triggering unit) is visible to player 1) == True
But the nydus worms do not trigger the event ... and on a larger map, there can be many worms be placed. Therefor I can not include this condition in the event check. I have to use the condition within an loop to test all worms. This condition does not cover ((Triggering unit) was visible to player 1) == True, does it?
Make it a periodic event of like 1 second or so. Pick each nydus worm and check if it is visible, if yes, use the custom value thingy for units and change it to something (lets say 42). Then in the trigger that orders units, check the custom value of the nydus worm is 42, if not, order the unit to the center first, if yes, make it move directly or whatever.
I know, there is not such event that does exactly cover this event. But how could it be substituted?
I am spawning in random point all over the map several nydus worms. As long as the worm is not spotted by the player it should send its squads to the center of the map and then to any base of the player. This should disguise the position of the worm for some time. After it is spotted it can send its troops directly to the destination point.
If a worm is killed it will respawn at a different position. Again hiding its troops path.
There is an event like this:
But this would fire too often.
There is also a condition of
But the nydus worms do not trigger the event ... and on a larger map, there can be many worms be placed. Therefor I can not include this condition in the event check. I have to use the condition within an loop to test all worms. This condition does not cover
((Triggering unit) was visible to player 1) == True
, does it?Make it a periodic event of like 1 second or so. Pick each nydus worm and check if it is visible, if yes, use the custom value thingy for units and change it to something (lets say 42). Then in the trigger that orders units, check the custom value of the nydus worm is 42, if not, order the unit to the center first, if yes, make it move directly or whatever.
@TheAlmaity: Go
Thanks, I will try that. I hope, this does not cost to much performance ... to check every few seconds every worm vs every human player ;)