5 [
Attribute(defvalue:
"1",
desc:
"Will the command be shown to leader?")]
6 protected bool m_bShowToLeader;
8 [
Attribute(defvalue:
"0",
desc:
"Will the command be shown to member?")]
9 protected bool m_bShowToMember;
11 [
Attribute(defvalue:
"0",
desc:
"Will the command be shown while commanding from map?")]
12 protected bool m_bShowOnMap;
14 [
Attribute(defvalue:
"0",
desc:
"Is the command available while player is dead?")]
15 protected bool m_bUsableWhileDead;
17 [
Attribute(defvalue:
"0",
desc:
"Is the command available while player is unconscious?")]
18 protected bool m_bUsableWhileUncouscious;
20 [
Attribute(defvalue:
"0",
desc:
"ID of the gesture in gesture state machine to be played when command is given out. 0 = no gesture")]
21 protected int m_iGestureID;
23 [
Attribute(
"", UIWidgets.EditBox,
"Name of the sound event to be played, leave empty for no event")]
24 protected string m_sSoundEventName;
27 override bool CanRoleShow()
29 SCR_PlayerControllerGroupComponent groupController = SCR_PlayerControllerGroupComponent.GetLocalPlayerControllerGroupComponent();
33 bool isPlayerLeader = groupController.IsPlayerLeaderOwnGroup();
34 if (isPlayerLeader && !m_bShowToLeader)
37 if (!isPlayerLeader && !m_bShowToMember)
44 void PlayAIResponse(IEntity slaveGroup)
50 AIAgent agent = aiGroup.GetLeaderAgent();
54 IEntity owner = agent.GetControlledEntity();
58 SCR_CommunicationSoundComponent soundComponent = SCR_CommunicationSoundComponent.Cast(owner.FindComponent(SCR_CommunicationSoundComponent));
62 soundComponent.SoundEventPriority(
SCR_SoundEvent.SOUND_CP_POSITIVEFEEDBACK, 50);
66 string GetSoundEventName()
72 override bool CanShowOnMap()
78 int GetCommandGestureID()
84 override bool CanBeShownInCurrentLifeState()
86 PlayerController playerController =
GetGame().GetPlayerController();
87 if (!playerController)
91 ChimeraCharacter character = ChimeraCharacter.Cast(playerController.GetControlledEntity());
96 CharacterControllerComponent controller = character.GetCharacterController();