As long as I know about floating texts, the only way to make it is how garfieldleet said. by setting a variable to unit and floating text, and just moving the floating text's variable to position of unit's variable. well its about what you wanna do with floating text, if its hp or something like that you could try to use multiboard to show selected units hp.