Setting Two Strings as a Name

Post » Tue Dec 29, 2009 4:03 pm

I was wondering if it is possible to assign two separate String Variables as one to become an NPC's Name?

I.e....:
StringA - Randomly generated Fore Name (from a list)
StringB - Randomly generated Sur Name (From a list)
StringC - StringA + StringB - Becomes Character's Name

Thanks for any help :)
User avatar
Sarah Kim
 
Posts: 3407
Joined: Tue Aug 29, 2006 2:24 pm

Post » Tue Dec 29, 2009 2:10 pm

Yes. Pretty much exactly like that, in fact.

I think this works, also:
let strVar1 := "first name"let strVar2 := "second name"actor.SetName (strVar1+" "+strVar2)

User avatar
Matthew Aaron Evans
 
Posts: 3361
Joined: Wed Jul 25, 2007 2:59 am

Post » Tue Dec 29, 2009 8:58 am

Don't think setName works with string_vars. Better to add the toString shorthand : actor.setName $(strVar1+StrVar2)
User avatar
Tamara Dost
 
Posts: 3445
Joined: Mon Mar 12, 2007 12:20 pm

Post » Tue Dec 29, 2009 6:13 am

Thank-you for the replies :)
User avatar
Cathrin Hummel
 
Posts: 3399
Joined: Mon Apr 16, 2007 7:16 pm


Return to IV - Oblivion