ARConfirm

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article

Contents

Overview

The ARConfirm entity displays a pop-up confirmation dialog with one or two stages. According to the Property settings, the choices offered can result in one of the following: opening the Places Browser to teleport to a new city, executing a script command, or using the FlowGraph output events for subsequent behavior. See Teleporting for other teleporting entities.

In the CityEditor, drag the ARConfirm entity into the level. The FlowGraph setup section describes how to trigger this entity.

Image:teleport_ARConfirm_bowlInGame.png


Properties

Most of the Properties are used to customize the pop-up dialog; the others determine whether the dialog has one or two stages and whether to go to a new level, execute a script command, or use the FlowGraph output events.

Here are some scenarios:

  • the ScriptCommand will be executed if SingleStage is set to true, and a command is supplied.
  • for the Places Browser to be shown in the first stage, the SingleStage is set to true, the NewLevel_SingleStage is specified, and the ScriptCommand is blank; when the Places Browser is displayed this NewLevel is pre-selected.
  • for the Places Browser to be shown according to the second stage choice, SingleStage is set to false, and the Stage2 Properties are specified including NewLevel_Stage2 names; in the first stage the left button advances to stage 2 while the right button or "x" button closes the dialog.
  • to use the FlowGraph output events, the ScriptCommand and NewLevel fields are left blank.

Image:teleport_ARConfirm_propsBowl.png

BtnLeft_fsCmd, BtnRight_fsCmd, BtnClose_fsCmd
string FSCommands sent from the Popup Flash movie's Actionscript upon clicking left, right and close 'x' buttons; if using the default Popup, use the default FSCommands.
BtnLeft_text, BtnRight_text
string left and right button label text.
ConfirmMsg
string dialog text which appears in the center of the pop-up.
NewLevel_SingleStage
string pre-selected level to display in the Places Browser, upon clicking the left button (with Single Stage set to true).
if this is unspecified, the Places Browser will not open and the FlowGraph Stage1_LeftBtn output will be activated.
Popup
Flash movie file used for the modal pop-up dialog.
either use the default background (pictured above), or supply a new one and include new FSCommand names in respective properties.
ScriptCommand
string executed upon clicking the left button in the single stage.
this works the same as an ARAvatarTrigger's ScriptCommand, described here.
this can be tested by printing: ARDebugMessage("ARConfirm ScriptCommand").
Single Stage
bool flag determines whether the pop-up has one (true) or two (false) stages.
false is used to specify a two-stage pop-up. In the example below, user first clicks to Play or Ignore golf; then they choose whether to go to the golf course level or the 1-hole level:

Image:teleport_ARConfirm_propsGolf.png Image:teleport_ARConfirm_golfInGame.png


The Stage2 Properties are the same as the first set, except a NewLevel_Stage2 can be specified for each button and there is no ScriptCommand.

If the NewLevel_Stage2 fields are blank, the Stage2_LeftBtn, Stage2_RightBtn, and CloseBtn FlowGraph output events are activated.

FlowGraph setup

The ARConfirm entity can be triggered in the FlowGraph, for example with an ARItem:

Image:teleport_ARConfirm_fg.png

or with an ARAvatarTrigger:

Image:teleport_ARConfirm_fgBowl.png

Input

Start
displays the pop-up.
Finish
hides the pop-up, without requiring the user to choose an option from the pop-up.
One case to use the Finish event is shown above in the bowling startup FlowGraph; if an avatar runs beyond and leaves the trigger area, we hide the pop-up.

Output

Stage1_LeftBtn, Stage1_RightBtn, CloseBtn
events are activated upon clicking respective buttons if SingleStage Property is set to true, and both ScriptCommand and NewLevel_SingleStage fields are blank.
Stage2_LeftBtn, Stage2_RightBtn, CloseBtn
events are activated upon clicking respective buttons if SingleStage Property is set to false, and both NewLevel_Stage2 fields are blank.
Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools