|
Post by morgana1 on Aug 3, 2020 6:38:23 GMT -5
I’m making a mod to detect richs sims and I’m not able to find a code to detect close sims with python.
I found two options:
services.active_sim_info().Proximity
services.active_sim_info().LineOfSight
But it doesn’t work. Even if my sim is close to another sim, the value is None.
Could someone help me?
|
|
|
Post by morgana1 on Aug 6, 2020 5:30:16 GMT -5
I have found a solution for this:
def nearby(sim): sim_obj = services.object_manager().get(sim.id) exclude = (sim,) if sim.is_sim else None nearby_sims = placement.get_nearby_sims_gen(position=sim_obj.position, surface_id=sim_obj.routing_surface, radius=10, exclude=exclude, stop_at_first_result=False, only_sim_position=True, check_all_surfaces_on_level=True) return nearby_sims
|
|