Forum Discussion

IngeJones's avatar
9 years ago

Portal pairs

@SimGuruEugi or @SimGuruModSquad can you tell me whether and where it's possible to specify the exit point of reciprocal portals on a portal object eg a door? I mean supposing I wanted to make a modded door where you enter from one room and the exit point was not in the adjacent room but in some other part of the lot, or one floor level up? Maybe set as an offset to the root bone or something? Or is this set by the C++ engine upon placement of the door and therefore we can't tune it?
  • Hi @IngaJones,

    There is definitely hard coding in C++ around some of the portal stuff and that could be an issue here. However that shouldn't be the case here, but it would require python changes. If that's not a deal breaker for you, some info to get you started: look in portal.py for PortalType_Wormhole which is the type of portal you want, nothing is using it currently. Also, look at the use of add_portal which takes this as a parameter.

    -SGMS
  • "IngeJones;15205939" wrote:
    Ok it doesn't really help, cos I get to: add_portal = _pathing.add_portal and then it kind of vanishes, so I can never find an example of it being used. Got nothing to guide me. In past Sims games, the portals of both stairs and doors were related to positions of bones and routing slots on the doors or stairs. If you moved the slots, the sim portaled to the new position. I have regrets that this has all changed.


    This is still how it works. You can get the bone position of any object. You can check out how doors do it. Stairs are a little more complicated because of multi-lanes, but it's still the same concept. add_portal takes an entry and exit point. The points you pass into it are completely arbitrary. If you compute them using bone offsets, then it'll work the way you expect it to.
  • Ok it doesn't really help, cos I get to: add_portal = _pathing.add_portal and then it kind of vanishes, so I can never find an example of it being used. Got nothing to guide me. In past Sims games, the portals of both stairs and doors were related to positions of bones and routing slots on the doors or stairs. If you moved the slots, the sim portaled to the new position. I have regrets that this has all changed.

    Anyway I guess it doesn't matter now, since my aim was to make a lift, and I see we're getting them in November anyway :)