Page 1 of 1

For what is dsb_set_charname?

Posted: Thu May 19, 2011 1:57 pm
by Qwerty
Sophia wrote:Added dsb_set_charname(char, text) and dsb_set_chartitle(char, text) for dynamically changing character names
I know that function of dsb_get_charname is to get Character's name, but I don't know what are these functions and How to handle its?
Could you tell me some explanation or example?

Re: For what is dsb_set_charname?

Posted: Thu May 19, 2011 8:44 pm
by Sophia
It sets the character's name.
For example dsb_set_charname(char, "MOPHUS") will change the name of whatever character to "MOPHUS".

This will retroactively fix the naming bug in DSB 0.47 and before. ;)

Code: Select all

for ppos=0,3 do
   local char = dsb_ppos_char(ppos)
   if (char) then
      if (dsb_get_charname(char) == "HISSSS") then
         dsb_set_charname(char, "HISSSSA")
      end
   end
end

Re: For what is dsb_set_charname?

Posted: Fri May 20, 2011 1:50 pm
by Qwerty
Ah, I understand!
Thank you for explanation.