Im trying to use a trigger_device to get what player triggered the device, and then save them in a variable that i can then access later in other parts of the code. But i cant really find a way to make an variable that stores an empty agent to begin with.
This is my code atm (get errors when i try to set Queen to ValidAgent since its not the same type):
@editable ClassTrigger : trigger_device = trigger_device{}
var Queen : ?agent = false
Trigger(Agent : ?agent): void =
if (ValidAgent := Agent?):
set Queen = ValidAgent
OnBegin<override>()<suspends>:void=
RoundStarter.BeganEvent.Subscribe(OnRoundStarted)