To get trace working along the c_move in two different functions you need towthings, a vector/variable that stores the distance got by c_trace (I'd go with vector , see below) and a list of entities you want function to affect.

I'd go with something like this: First "register" entities you've created to a array, lets say 10 of size. (ENTITY* ent_registered[10]) Along this array you have a VECTOR array of same size (both are global of course in this case). Here the vector array's size would be 10 (VECTOR vec[10]) then add movements to vectors. After they've been added get the movements to c_move by number you've saved the vectors. Easiest way for this is to register ent by certain number and use that same number for its vectors

The code itself is easy once you figure it out, good luck laugh