One of the most powerful features of DART is the ability to assign behaviors to targets. This allows targets to act or move in varied and even unpredictable ways.
Note: In this lesson, we’ll use behaviors with 2D targets, but they can be used with TruTargets as well.
The basic idea of behaviors is something like this; if a TRIGGER EVENT happens, the target should execute an ACTION.
Here are some quick examples;
- If the target is shot in the bullseye, it should fall down
- When 4 seconds have passed, the target should disappear
- If the non-threat target gets within 10 yards of the shooter, it should change to a threat target
In all of these cases, there is a trigger event and an action. Let’s start by creating a course with a simple target behavior.
Start DART Studio. You will see the default screen like this.
Select the Targets menu and choose the Path option.
Let’s give the target a path to follow by selecting Load Path and selecting the Back and Forth path from the DART Paths folder as shown here.
Next, click the Motion option and set Travel Time to 15 seconds. You can preview the target motion by pressing the 3 key or clicking the Preview button. It should look like the video below.
Now let’s create a simple behavior for this target. Click the Behavior option. The top row is reserved for trigger events, while the bottom row is used for actions.
Click the Trigger button on the top row. This is a multi-select button that provides six different options. Select Time. Once you do, you’ll see two sliders appear; Starting Time and Ending Time.
For now, set both sliders to 5. We have now defined the trigger event as 5 seconds after the stage begins (not including any countdown or instruction time). Now, all we need to do is define what should happen at 5 seconds.
Click the Action button on the bottom row. It is also a multi-select button that provides seven options. Select Freeze.
We have just instructed our target to freeze after 5 seconds. Try it by pressing the 3 key. Your target should have stopped in its tracks 5 seconds after the stage began. This is the basic idea behind all behaviors. You define the trigger event and the action that will occur when (or if) the trigger conditions are met.
Let’s go back to the triggers on the top row. The Time trigger has two sliders; Starting Time and Ending Time. Currently, they are both set to 5 (seconds), so the target froze in place precisely at the 5-second mark. But what will happen if you set the Ending Time slider to 10? Try it and preview the result.
What we’ve just done is to add an element of randomness to the stage by setting our trigger to sometime between 5 and 10 seconds. Now your target may freeze anytime between 5 and 10 seconds – at it will be different each time you run the stage.
On the bottom Action row, there are four buttons. The Action button allows you to select from a list of Actions – such as Freeze which we used in the earlier examples. The next three buttons allow you to execute specific actions in addition to the Action button.
Click the Load Audio button and select the file “I surrender 1” from the TruTarget Phrases folder as shown below.
Now preview the course. Somewhere between 5 and 10 seconds, your target should stop AND say, “I surrender” similar to the video below. This is an example of calling multiple actions with a single trigger event.
Practice using different Triggers and Actions. In the next lesson, we’ll use target behaviors to create a threat/no threat type of course.