The UDT structure should be defined outside of functions. Also keep in mind that any UDT-based variable you create within a function cannot be returned from a function.
When you define a UDT variable, its scope is no different than defining any other variable.
If you plan on having more than one character, store them into an array. You can use the array commands to add new elements and create a UDT within a function. Using function parameters to set the values of the UDT then assigning it to a new element in the array. The arrays are global by default.
TYPE MyUDT
var1 as integer
var2 as float
var3 as string
EndType
chars() as MyUDT
DO
// do stuff
LOOP
function createCharacter(a, b, c)
array insert at bottom chars()
chars().var1 = a
chars().var2 = b
chars().var3 = c
endfunction
"You're not going crazy. You're going sane in a crazy world!" ~Tick