Page tree
Skip to end of metadata
Go to start of metadata




Introduced in

Version:1.30

Description

Description:

This creates an information bubble that hovers next to an object on the player screen.

This is the same type of bubble that is used by fn vbs speak and fn vbs observation. The only difference is that the bubble is displayed directly, without any tests to see if the object is visible or within the player range.

This function should only be used, if fn vbs speak and fn vbs observation are not suitable.

Syntax

Syntax:[target, text, <dimensions>, <type>, <time>] call fn_vbs_infobubble
Parameters:
  • target: Object - object info bubble will hover next to
  • text: String - text of bubble
  • dimensions: Array - Array (in the format lines, width_mult, font_mult]) defining the size of the displayed bubble.
    • lines - The bubble holds this many lines of text vertically.
    • width_mult - Default bubble width is multiplied by this.
    • font_mult - Default font size is multiplied by this (optional, If omitted, or if an empty array is passed, defaults are used: [4, 1, 1]).
  • type: Number - What type of bubble to use (optional, default: 0):
    • 0 - Rectangular bubble
    • 1 - Speech bubble.
  • time: Number - Number of seconds to display the bubble (optional, if omitted, the time is determined from the text length).
Return Value:Nothing

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
[car1, "Text text text"] call fn_vbs_infobubble

Additional Information

See also: fn vbs speak, fn vbs observation
Multiplayer:This is local in MP. It should be called on all clients, if required.
Problems: 

Notes