logo

NO_SCR_MissionSelectionAction

In order to have working mission selections you must have an entity with both a MissionSelectionManagerComponent and a MissionSelectionAction located inside of an ActionsManagerComponent.

The MissionSelectionAction can be placed in the additional actions of any ActionsManagerComponent as shown below. It will need a parent context list (the location the action appears), you can use pre-existing ones or make your own.

It will also need a name for the action, the description is not important. And at the bottom it can be provided some on mission text, ‘In Progress’ is always a good option but something mission specific can also be used.

Lastly there is the ‘Is Reset Action’ checkbox. You may want to include at least one of these with a large sort priority so that the mission state can be reset once saved.

Variables
Name Real Name Category Description
Name m_sName Action UI text.
On Mission Text m_sOnMissionText Text shown when mission is active!
Is Reset Action m_bIsResetAction Creates a special action that can reset the mission states!

The NO_SCR_MissionSelectionAction like any ScriptedUserAction can be inherited from, so that a custom mission action can be made that will setup the mission. Just make sure to call super on overridden methods (example below).


class MyAwesomeMissionAction : NO_SCR_MissionSelectionAction
{
	override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
	{
		super.PerformAction(pOwnerEntity, pUserEntity);
		//Do mission setup stuff
	}
}
0 found this helpful