MSELI

Overview

Master scenario events list injection (MSELI) allows you to create arbitrary events in the simulation and provide them with execution orders and conditions for their execution during the scenario. 

Page Contents

ExampleMSELI

Purpose

Master scenario events list injection (MSELI) allows you to create arbitrary events in the simulation and provide them with execution orders and conditions for their execution during the scenario. 

For instance, an IED detonates in a village after an agent approaches its location, or a dust storm occurs after 5 minutes of the simulation running.

How to Use

Reference the following examples for your simulation:

				
					
// Add functionality to scenariosystem
// Temporary make direct call instead:
 Globals.api.worldStateSystem.SetTimeOfDay(new DateTime(2021, 5, 22, 10, 43, 21));
 
// Add functionality to scenariosystem
// DateTime scenarioStart = Globals.api.scenarioSystem.GetScenarioStartTime();
// Temporary fix:
DateTime scenarioStart = Globals.api.worldStateSystem.GetTimeOfDay();
 
// Craft some simple timed msels
ScenarioEvent e1 = new ExplosionScenarioEvent(scenarioStart.AddSeconds(5), new RideVector3(1, 2, 3));
// Add functionality to scenario system
Globals.api.scenarioSystem.AddScenarioEvent(e1);
				
			

Scene Location & Name

Assets/Ride/Examples/Scenarios/ExampleMSELI.unity

Setup Requirements

Refer to ExampleMSELI.cs for the simple timed events used in the example scene.