VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Decide to Give Up (decideToGiveUpTask)

Table of Contents

The Decide to Give Up example demonstrates the following:

The Decide to Give Up example installs a new version of the DtGroundMoveToControllerComponent to give up the task after a certain amount of sim time. This example can be used as a starting point for other type of reasons to give up on a task.

Since this example is loaded as a plugin, it can be used in conjunction with the released VR-Forces application

How to Run the Example

This example demonstrates how to add 'decide to give' up logic to an existing behavior.

Usage

In the Launcher, click the Plug-ins button to bring up the Plug-ins Selection dialog. Enable the plugin. Then launch VR-Forces.

To view the new behavior:

  1. Create a new scenario (use any terrain database).
  2. Create a M1A2 entity.
  3. Create a waypoint, some distance away from the entity (at least 50 meters away).
  4. Give the entity a move-to <waypoint> task.
  5. Right-click > Information... on entity to open its information window.
  6. Set the Object Console Notify Level to Info.
  7. Click on play button.

Observe the output in the entity's Object Console window. After 10 seconds of simulation time, the enitty will stop moving and there will be messages printed to the console indicating that the entity has 'given up on the task'.

Classes

DerivedMoveToControllerThis subclass of DtGroundMoveToControllerComponent gives up on the movement task after a certain amount of simulation time.

Plugin Entry Points

/*******************************************************************************
** Copyright (c) 2003 MAK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
/*******************************************************************************
** $RCSfile: plugin.cxx,v $ $Revision: 1.3 $ $State: Exp $
*******************************************************************************/
#include "vrfcgf/cgf.h"
extern "C" {
{
info.pluginName = "decideToGiveUpTask";
info.pluginVersion = "1.00";
info.pluginCreator = "MAK Technologies";
info.pluginCreatorEmail = "sales@mak.com";
info.pluginContactWebPage = "www.mak.com";
info.pluginContactMailingAddress = "150 Cambridge Park Drive 3rd Floor - Cambridge, MA 02140 USA";
info.pluginContactPhone = "(617) 876 8085";
}
DT_VRF_DLL_PLUGIN bool DtInitializeVrfPlugin(DtCgf* cgf)
{
return true;
}
}

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)