I’m having an issue using GameNotificationBus. The OnEventBegin event is being called but the data I’m attempting to pass through it isn’t coming through. The function is being called with “(a userdata value)” according to the debugger.
Here is the relevant code:
self.pitchNotificationId = GameplayNotificationId(self.entityId, "pitch", "float"); GameplayNotificationBus.Broadcast.OnEventBegin(self.pitchNotificationId, 10);
self.pitchNotificationEventId = GameplayNotificationId(self.entityId, "pitch", "float"); self.pitchNotificationHandler = GameplayNotificationBus.Connect(self, self.pitchNotificationEventId); ... function camera:OnEventBegin(pitchDelta) if GameplayNotificationBus.GetCurrentBusId() == self.pitchNotificationEventId then if(pitchDelta == 10) then Debug.Log("correct value"); else Debug.Log("incorrect value"); end end
And I get the error message:
Is there something wrong with this script? Why does it seem like everything I send through GameNotificationRequestBus ends up being a userdata object?