Skip to main content

Execute_SetKnockDoorVisitSitePrivilege

Description

Script execute function to grant or revoke a character's non-persistent knock-door visit access. Granting also registers the character as an invitee of the Target door's Residence Site (unless it belongs to the owner household), so it passes the doors whose permission group is Family or Relationship, and gives interior visibility for that Site. It does not bypass doors of other permission groups. It replaces any previously granted knock-door visit access. The access and the invitee registration made by it are revoked when the character leaves that Site; invitees added by the player stay.

Parameters

ParameterDescription
BaseObjectSelf or Target. The access is granted to or revoked from BaseObject
S2For grants only: None uses Target; CoopMainTarget uses the current Coop's main target; NonBaseObjectResidence uses the exterior door of the residence owned by the NonBaseObject
F11 grants access; 0 revokes BaseObject's current access

Notes

The resolved door must be a valid exterior Residence door when granting. NonBaseObjectResidence resolves the residence owned by the NonBaseObject's household and uses its first exterior door. It is meant for card-answer scripts, where Self is the host and Target is the guest, so BaseObject=Target grants the guest access to the host's residence. When the host owns no residence or the residence has no exterior door, nothing is granted and a warning is logged.

Examples

DescriptionBaseObjectCommandS2F1
Grant access using the script TargetSelfSetKnockDoorVisitSitePrivilegeNone1
Grant access using the current Coop's main targetSelfSetKnockDoorVisitSitePrivilegeCoopMainTarget1
Revoke current knock-door visit accessSelfSetKnockDoorVisitSitePrivilegeNone0
Grant the Target access to the Self's residenceTargetSetKnockDoorVisitSitePrivilegeNonBaseObjectResidence1
Revoke the Target's knock-door visit accessTargetSetKnockDoorVisitSitePrivilegeNone0