You'd have to have specific character names, but you could do something like this, from what I understand:
<Dialog branch="0" r="-1">
OnCharDeath/-1,None,The Engineer/Engineer/Lo I have been slain, and my stone golem shall fall with me!
<Reply>.../NewBranch/1</Reply>
</Dialog>
<Dialog branch="1">
OnCharDeath/-1,None,The Engineer/The Game/removing engineer and golem
<Action>RemoveChar/The Engineer</Action>
<Action>RemoveChar/Stone Golem</Action>
<Action>EndConvImmediately/</Action>
<Reply>.../NewBranch/1</Reply>
</Dialog>
When the engineer dies, the engineer blurts out some random phrase. After the dialog box is clicked, it removes the engineer and his stone golem. I haven't tested it, however.