Yes, writing _variableName = damage Player will mean that _Variablename (which is a local variable) will consist of a number between 0 and 1 (the possible return values of the command
damage).
As to modifying the health of passengers as opposed to the vehicle: try something like.
driver Vehicle setdamage X
gunner vehicle setdamage X
(crew vehicle select 3) setdamage X
Otherwise, you might try
assignedVehicleRole to figure out the role the unit you want to modify has at that time, and then work with it. Sadly, it returns an array with a string in it, so it's not actually useful without some prior modification. But yes. Work with those!
Wolfrug out.