Follow

This bloc of code allows you to make your subject follows an targeted unity by moving in his direction (only horizontally). The first parameter determines which unity you are targeting with your subject, and the second parameter how many time the subject follows it.