Seems like more of a question for the Construct 3 forums since people here use a wide variety of development platforms...
...in general, you would just need to have a pointer to the character you want to move, instead of moving the character in a "hard-coded" way. How this is done in C3 I have no idea though :P