Skip to main content

Execute_CreateSiteEventOnFreeTime

Description

Creates the social event named by S1 at the earliest hour both the BaseObject host and the other character are free, where CreateSiteEvent places it at a time the data names outright. Exactly one character is invited, so this belongs on a script that runs between two characters. When the coming week holds no hour the two share, no event is created and the host receives an activity feed saying so.

Note

Today through the next six days are searched in order and the first hour that fits wins. A slot must sit inside the event site's visiting hours and must end before the DataAsset window closes, and an event never runs past midnight. The host is blocked by every schedule it holds. A target that does not belong to a residence family is blocked only by work, school and social event schedules, so an ordinary NPC routine is overridden rather than avoided.

Parameters

ParameterDescription
BaseObjectThe host character who creates the site event. The other character is the single invitee.
S1SocialEventTemplateTable row ID identifying the event template.
S2True to consider weekends and public holidays only. False or None considers every day.
F1 / F2Not used. The hour window comes from UB1SocialEventDataAsset.FreeTimeEventCreateRange.

Examples

DescriptionBaseObjectCommand
Book the event at the earliest hour both are free on any daySelfCreateSiteEventOnFreeTime
Book it only on a weekend or a public holidaySelfCreateSiteEventOnFreeTime