Cerebrum™
Loading...
Searching...
No Matches
OMH_Commands

Functions

virtual bool Cerebrum.ObjectMessageHandlerBase.HandleMessage (string msg, string param, out string retString)
 Handles messages sent to this game object from current MyGameManager.
 
void Cerebrum.ObjectMessageHandlerBase.LookAt (string param, bool upright=false)
 Camera Commands and functions.
 
void Cerebrum.ObjectMessageHandlerBase.LookAtLegacy (string param, bool upright=false)
 LookAt an object from an optional offset or location.
 

Detailed Description

Commands for OMH

Function Documentation

◆ HandleMessage()

virtual bool Cerebrum.ObjectMessageHandlerBase.HandleMessage ( string  msg,
string  param,
out string  retString 
)
virtual

Handles messages sent to this game object from current MyGameManager.


Follow

follow AIM_OBJECT [TAGET_OBJECT | TARGET_OBJECT_TAG]

Follows the object TARGET_OBJECT or the object with tag TARGET_OBJECT_TAG.

Parameters
TARGET_OBJECTobect to move towards
TARGET_OBJECT_TAGtag of obect to move towards

Examples:

Player Follow Player
Player Follow $Nurse
Cart Follow MainCamera


SwitchToScene

SwitchToScene SCENE_NAME

Switches to SCENE_NAME parameter

Parameters
SCENE_NAMEscene to switch to

Examples:

SwitchToScene 'Level2'
SwitchToScene $level

Clickable objects and buttons

Clickable.resetPressed

ResetPressed

Clickable.ResetPressed

Resets clicked-on flag "pressed" to false

Examples:

$Patient Clickable.reset
$GXMForm reset

Clickable.reset

Reset

Clickable.Reset

Resets clicked-on flags "pressed" to false and "clickable" to true

Examples:

$Patient Clickable.reset
$GXMForm reset

Clickable.IsPressed

Pressed

Clickable.IsPressed

Checks whether object was clicked on (clicked-on flag "pressed" set)

Returns
whether object is pressed

Examples:

If
$Patient Clickable.IsPressed
Then
Do 'PatientCheck.txt'
Endif

Clickable

Selectable

Clickable.On [ true | false ]

Checks whether object was clicked on (clicked-on flag set)

Parameters
trueor 1 for on, false or 0 for off. Omitted parameter is on.

Examples:

$Patient Clickable.On true
$Patient Clickable.On $CanSelect
$Patient Clickable.On

Audio commands

MOVETO message sets camera position and rotation. moveto/align/orient targetObject [duration]

LOOKAT message sets camera position and rotation. lookAt targetObject offset lookAt targetObject viewerObject(for position) lookAt targetObject ("close", "medium", or "far"(using CameraTargetParams data))


Menu.on

Menu.question

Menu.choices

Menu.done

Menu.result

Menu.choice

Menu.on - turn object's menu on

Menu.question - set menu's question

Menu.choices CHOICE_STRINGS - set multiple-choice choices

Menu.done - true when choice has been made

Menu.result MATCH_STRING - bool containing whether choice matches MATCH_STRING

Menu.choice - string containing the choice that user made

Switches to SCENE_NAME parameter

Parameters
CHOICE_STRINGSchoices separated by space or comma. If choice has a space or commad, enclose in single quotes.
MATCH_STRINGstring exactly matching one of the choices

Examples:

ZoomSpot Menu.Choices 'Turn' 'Cancel' 'Put Back'
ZoomSpot Menu.Question 'Infusion Set'
ZoomSpot Menu.Choices 'Turn' 'Cancel' 'Put Back'
ZoomSpot Menu.on ZoomSpot
WaitFor
ZoomSpot Menu.Done
If
ZoomSpot Menu.Result 'Turn'
Then
Prompt 'Chose to turn it'

Reimplemented in Cerebrum.OMHChatBubble, Cerebrum.OMHHuman, and Cerebrum.OMHPatient.

◆ LookAt()

void Cerebrum.ObjectMessageHandlerBase.LookAt ( string  param,
bool  upright = false 
)
protected

Camera Commands and functions.

LookAt an object from an optional offset or location.

lookat AIM_OBJECT [CAM_OFFSET] [duration=0] lookat AIM_OBJECT [duration=0] Looks at the AIM_OBJECT from an optional distance CAM_OFFSET and optional duration. Examples:

Player LookAt Bob Chair/Eyeheight #lookat Bob from Chiar/Eyehieght location
Player LookAt Bob 0.0 -0.5 -2.0 #look slightly up at Bob
Parameters
AIM_OBJECTobect to look at
CAM_OFFSETVector3 | OBJECT_LOCATION
OBJECT_LOCATIONObjectName
Here is the caller graph for this function:

◆ LookAtLegacy()

void Cerebrum.ObjectMessageHandlerBase.LookAtLegacy ( string  param,
bool  upright = false 
)
protected

LookAt an object from an optional offset or location.

lookat AIM_OBJECT [CAM_OFFSET] Looks at the AIM_OBJECT from an optional distance CAM_OFFSET. Examples:

Player lookAtLegacy Fridge closeup
Player lookAtLegacy Bob Chair/Eyeheight
Player lookAtLegacy Bob 0.0 -0.5 -2.0 #look slightly up at Bob
Parameters
AIM_OBJECTobect to look at
CAM_OFFSETVector3 | DISTANCE_KEYWORD | OBJECT_LOCATION
DISTANCE_KEYWORDclose | closeup | medium | med | far
OBJECT_LOCATIONObjectName
Here is the caller graph for this function: