BlackICE Scripting

class re

Interactions

re.Interactions

  • 0 properties
  • 4 functions

Properties

None.

Functions

  • ulong? Attach(ent.Entity entity, InteractionChoice[] choices, Action<InteractionSelection> onSelected, InteractionOptions? options = null, Action? onLost = null) staticextension

    Attaches an interaction to an entity (an NPC, device, vehicle, ... any game object), following it as it moves. The entity's own interactions are not affected. Returns a handle for SetChoices and Remove, or null when the entity does not exist or is not a game object, already has a prompt (Style.Prompt) interaction, or the choices or options are invalid. In case of failure, the reason is logged. Interactions are removed when their entity despawns (onLost is called) and when the bundle unloads

    choices
    At least one. Prompts show up to four
    onSelected
    Called when the player picks a choice
    onLost
    Called when the interaction was removed because its entity despawned
  • ulong? Place(Vector3 position, InteractionChoice[] choices, Action<InteractionSelection> onSelected, InteractionOptions? options = null, Action? onLost = null) staticextension

    Places an interaction at a world position. An invisible anchor entity is spawned there to own it and despawned with it. Returns a handle for SetChoices and Remove, or null when the choices or options are invalid. Interactions are removed when the bundle unloads

    choices
    At least one. Prompts show up to four
    onSelected
    Called when the player picks a choice
    onLost
    Called when the interaction was removed because the anchor failed to spawn
  • bool Remove(ulong interaction) staticextension

    Removes an interaction created by this bundle. Returns false when the handle is unknown

  • bool SetChoices(ulong interaction, InteractionChoice[] choices) staticextension

    Replaces the choices of an interaction created by this bundle. Visible right away, e.g. to dim a picked choice with already_read. Returns false when the handle is unknown or choices is empty