- Joined
- Jul 26, 2008
- Messages
- 1,009
Hi!
I'm currently trying to save string to a unit (Using AutoIndex) and then when a player patrols that unit they see the string in a text-tag. Easy nuff.
Problem is the case becomes all lowercase.
My process:
Basically it shows the text tag, but it shows it in Lower-Case instead of the proper casing used when the player created the text tag.
So, how do I get it to retain it's proper text case?
I'm currently trying to save string to a unit (Using AutoIndex) and then when a player patrols that unit they see the string in a text-tag. Easy nuff.
Problem is the case becomes all lowercase.
My process:
JASS:
//SAVING THE STRING TO A UNIT GROUP
//Checking what a player typed
if SubString(str, 0, 4) == "info" then
if (SubString(str,4,5) == " ") then
set udg_TEMP_String = SubString(str,5,StringLength(str))
else
set udg_TEMP_String = SubString(str,4,StringLength(str))
endif
call GroupEnumUnitsSelected(ENUM_GROUP, pl, function InfoTag)
//The grouping function
function InfoTag takes nothing returns boolean
set Info[GetUnitId(GetFilterUnit())] = udg_TEMP_String
return false
endfunction
//This happens when you patrol a unit
set tag = CreateTextTag()
if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
set str = Info[GetUnitId(GetOrderTargetUnit())]
else
set str = " "
endif
call SetTextTagText(tag, str, (12*0.023/10))
call SetTextTagPosUnit(tag, GetOrderTargetUnit(), 8.00)
call SetTextTagLifespan(tag, StringLength(str)*0.22 - 4*(StringLength(str)/120) )
call SetTextTagPermanent(tag, false)
call SetTextTagVisibility(tag, true)
call IssueImmediateOrder(GetTriggerUnit(), "stop")
Basically it shows the text tag, but it shows it in Lower-Case instead of the proper casing used when the player created the text tag.
So, how do I get it to retain it's proper text case?