Should I create an unit group if I wanted to check if they have any buff or passive ? Like "Pick Every Unit matching that has a buff" and do these actions
Or maybe, I can create a Start Trigger that turns on this one (the periodic trigger).
One Question @Emm-A- the custom script should be really in Conditions tab ? I can't understand very well your triggers, but they look good enough to solve my problem. My problem is HOW to detect the 300 units moved. I just can't understand them. XD
-It is totally up to you, when to start this periodic trigger. It really depends on the "what do you need it for", as already TheLordOfChaos201 was asking you to specify your problem. Right now, it runs from the map initialization with any unit, you set to YourUnit at map init (this is an "event" in GUI).
-About that custom script: Sry I am not sure, if this can be found there, if you are not using the Jass New Gen Pack Editor or UMSWE. You can just delete this if-then-else and set YourUnitLocation to the location of your wanted unit at map initialization.
As already said, it is hard to help you because you did not specify anything.
Unfortunately, I dont have the time to explain my trigger in detail, but I wrote it as easy as possible. Maybe you try to rebuild it line by line for yourself, this is the best way to understand it. DistanceCount is a real variable, to which the distance, your unit travels each 0.3 seconds of game time is added.
Obviously this is not perfect, as your unit might travel around in between 0.3 seconds, but I wanted to give you an example, that you can understand.
Maybe check for a Jass library in the spells section as well, you might find an easier way there.