Yup, that’s essentially it.
(Agent := Target? )
is basically saying try to get an agent from the Target which is an optional ?agent
. Optionals can ether be false or hold a value, in this case an agent.
That’s why you try to assign it inside an if statement, because if Target is false, then the entire expression will evaluate to false which means the GrantItem() won’t run.