Cluster Creator Kit Script Reference
    Preparing search index...

    Interface GiftInfoItem

    The gift sent in an event by a player. The value can be obtained by ClusterScript.onGiftSent.

    interface GiftInfo {
        giftType: string;
        id: string;
        initialPosition: Vector3;
        initialRotation: Quaternion;
        initialVelocity: Vector3;
        price: number;
        sender: PlayerHandle | null;
        senderDisplayName: string;
        timestamp: number;
    }
    Index

    Properties

    giftType: string

    Obtains the string which identifies the type of the gift. When gifts has same shape but different colors, then giftType will be different.

    Please see List of Gift Items about relationship between giftType values and actual gifts.

    id: string

    The string representation of the ID that uniquely identifies a gift in the event. A gift with different id specifies a different gift, even when other properties including senderDisplayName and timestamp are same.

    initialPosition: Vector3

    Obtains the initial position of the gift in global coordinates.

    Initial position specifies where the gift appears in the space. The position is near the hand of the player who sent the gift.

    When generating an item at this position, the item may collide with the gift and the gift effect may start at an unintended position. To avoid collision with the gift, do not attach a Collider to the item or set the layer of the generated item to VenueLayer0, VenueLayer1, VenueLayer2, etc.

    Please see Layers about available layers in the world.

    initialRotation: Quaternion

    Obtains the initial rotation of the gift in global coordinates.

    Initial rotation specifies the orientation of the gift when it appears in the space.

    initialVelocity: Vector3

    Obtains the initial velocity of the gift in global coordinates.

    Initial velocity specifies the speed of the gift when it appears in the space.

    The gift is not affected by the gravity set by PlayerHandle.setGravity and other methods, and moves in a parabolic trajectory with a constant downward acceleration.

    price: number

    Obtains the price of the gift as an integer value of Cluster Coin.

    sender: PlayerHandle | null

    The player who has sent the gift. The value will be null when the player is a ghost or a group viewing participant.

    It is possible that sender.exists() is false, when the player who sent the gift has already left the event.

    senderDisplayName: string

    The display name of the player who has sent the gift.

    Unlike GiftInfo.sender, this property returns valid name when the player is a ghost or a group viewing participant.

    timestamp: number

    Obtains the time when the gift was sent in UTC, in total milliseconds since Unix epoch.