Hi,
Let me ask a problem of signal remote event listener.
I created the following verse code. The purpose of this code is to switch camera angle and show message window when pressing “attack” button of Signal Remote.
OnBegin<override>()<suspends>:void=
AllPlayer : []player = GetPlayspace().GetPlayers()
for(Player : AllPlayer):
ItemGranter.GrantItem(Player)
OnA6M_GuideStart(PlayerAgent: agent): void = {
OnCameraSwitchto1Play(PlayerAgent)
}
OnCameraSwitchto1Play(PlayerAgent: agent): void = {
A6M_CameraSequence.Stop(PlayerAgent)
A6M_Widget : string =
"Window 1"
small_MessageWindow.AddWidget(PlayerAgent, A6M_Widget, window_small)
A6M_CameraSequence.Play(PlayerAgent)
set ControlChangeSubscriptionCamera2 = option{SignalRemoteManager.PrimarySignalEvent.Subscribe(OnCameraSwitchto2Play)}
}
OnCameraSwitchto2Play(PlayerAgent: agent): void = {
small_MessageWindow.RemoveWidget
A6M_Widget : string =
"Window 2"
small_MessageWindow.AddWidget(PlayerAgent, A6M_Widget, window_small)
small_MessageWindow.RemoveWidget
A6M_CameraSequence2.Play(PlayerAgent)
set ControlChangeSubscriptionCamera3 = option{SignalRemoteManager.PrimarySignalEvent.Subscribe(OnCameraSwitchto3Play)}
}
OnCameraSwitchto3Play(PlayerAgent: agent): void = {
small_MessageWindow.RemoveWidget
A6M_Widget : string =
"Window 3"
small_MessageWindow.AddWidget(PlayerAgent, A6M_Widget, window_small)
small_MessageWindow.RemoveWidget
SignalRemoteManager.PrimarySignalEvent.Subscribe(OnCameraSwitchto4Play)
}
(“small_MessageWindow” is another class that creates widget.
However, on this code, both method “OnCameraSwitchto2Play” and “OnCameraSwitchto3Play” is executed on “OnCameraSwitchto3Play” method and widget of the two method are shown.
I want to exexute only “OnCameraSwitchto3Play” method when pressing “attack” button of a signal remote on “OnCameraSwitchto2Play” method.
What is the reason of this problem and how to execute only “OnCameraSwitchto3Play” method?
Regards,