Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.




Introduced in

Version:1.30

Description

Description:
This is used
Used to
"
load an "
an
observation
about
for an object. Once the player can see the object and is close enough, the observation
will be
is "triggered", and a text bubble
will be
is displayed next to it.

For example, an observation

about

for a civilian could be

that "his coat seems bulky and there are wires sticking out of it

say: "wears a bulky overcoat". Once the player is close enough to the target, the above observation would appear on

his

the screen over the civilian.

Syntax

Syntax:[target, text, range,
<dimensions>
dimensions,
<condition>
condition] call fn_vbs_observation
Parameters:
object
  • Object to
be observed
  • observe.
  • text: String - Observation text
of observation
player
  • Player must be this close to make the observation.
Note that optics
  • Optics magnification
IS
  • is taken into account, allowing the observation to be made from further away.
  • dimensions: Array -
array
  • Array defining the size of the displayed bubble.

  • The format is: [lines, width_mult, font_mult]
    • lines - The observation bubble
will hold
    • holds this many lines of text vertically.
    • width_mult -
default
    • Default bubble width is multiplied by this.
    • font_mult (optional) -
default
    • Default font size is multiplied by this

Optional
    • . If
ommitted
    • omitted, or if an empty array is
passed
    • specified, the defaults
will be used
    • are: [4, 1, 1]
  • condition: Code (optional) -
optional condition
  • Condition that must be met for observation to
  • be triggered. Target object is
passed in
  • specified using the _this variable.
Return Value:Script -
if
If the terminate command is used on the return value
--
(before the observation
has been triggered--
is triggered), then the observation
will be
is unloaded from the object

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:
_script = [car1, "This car is extremely dirty, and it smells like pickles.", 20,[2, 
1.4
2, 0.85]] call fn_vbs_observation;
sleep 5;
terminate _script;

Image Modified

Additional Information

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

Notes