Detecting when a guard has been eliminated.

You need to write the function you are calling. Subscribe binds to a function called OnAIDeath, but there is no function by that name. The function should probably look something like this:

OnAIDeath(Agent:agent): void =
Print(“Guard has been eliminated.”)

In the above, you would put whatever expressions you wanted to happen after the guard is eliminated. In the Documentation, there is an elimination game example you can study to understand this more.

Hope that helps.

2 Likes