AI generates thing when killed-- prl_dropthing.cog
Killing an AI, for example an officer, will generate a thing in his place, for example, a yellow key. 22 July 2001

# Jedi Knight Cog Script
#
# prl_dropthing.cog
# Sylvicolus [PRL] 22 July 2001
#
# Actor creates Thing upon death.
#
# This cog is not supported by LucasArts Entertainment Co. 

symbols

message   killed

thing     ActorWithThing
template  ThingTemplate=keyyellow
thing     newThing      local

end

code

killed:
      newThing = CreateThing(ThingTemplate, GetSenderRef());
      return;

end