CREATE YOUR AI CUM SLUT ON CANDY.AI TRY FOR FREE
x

Ren'py assistance needed. abbreviate defined [player_name] ?

nevermoreXX

Member
Mar 25, 2020
424
685
Ren'py assistance needed. Strip defined [player_name] ?
I tried to but i couldn't find proper solution.
is it possible to abbreviate defined [player_name] to 1st letter of the name?
lets say player_name is Bobby
So i want to get first letter of the name and use it in text like "Hey there , Mr.[abbreviated name]" where abbreviated name would be first letter of the named character. Mr.B
any help appreciated
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,528
8,066
A string is an array of chars, so you should be able to get the first letter by simply doing player_name[0]
 
  • Heart
Reactions: nevermoreXX

nevermoreXX

Member
Mar 25, 2020
424
685
A string is an array of chars, so you should be able to get the first letter by simply doing player_name[0]
Yes yes yes! array of characters.. can u believe it that i actually had that in head, but i couldnt think of a proper(translated) english word how to name it for search..it works perfectly !
Thank you
 
  • Like
Reactions: Winterfire