Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Lab Assistant
Original Poster
#1 Old 2nd Jan 2017 at 11:24 PM
Default How to get sim names?
Hello,

I need to get current sim, that I am playing and second sim, with I am interacting (that I selected).

I found http://modthesims.info/t/548710 , that suggesting to use code
Code:
client = services.client_manager().get_first_client()
sim_info = client.active_sim.sim_info
full_name = sim_info.first_name + " " + sim_info.last_name


I think, it's from services\__init__.py file that contains functions

Code:
def get_active_sim():
    client = client_manager().get_first_client()
    if client is not None:
        return client.active_sim

def active_sim_info():
    client = client_manager().get_first_client()
    if client is not None:
        return client.active_sim_info


But what it will return - sim, that I playing with, or sim, which I interacting with?
If these functions return sim, that I playing with, then how to get another sim, that I interacting with?

Thank you very much!
Advertisement
Blenderized to Pieces
retired moderator
#2 Old 3rd Jan 2017 at 8:09 PM
I am not a programmer but I think it says this:


def get_active_sim(): define active sim

client = client_manager().get_first_client() - The client manager will get the first client

if client is not None: - If the client exists,

return client.active_sim - then it returns to the active client sim
Back to top