First: I'm trying to create a situation where a player can aim their crosshair over a corpse, press a key bind, and that corpse will revive and be a friendly. I've got most of that figured out, except that I can't figure out how to allow corpses to be targeted. I've tried messing with the monster's flags and death states, but I can't seem to get a combination that will work with the "player's target" pointer I'm using. What must I do to allow corpses to be targeted WHILE still allowing players and monsters to pass freely through them as per usual?
Secondly, if I can find a way to target the corpse, what's the best / most efficient way to restore it to full life? Add a friendly flag and then just send the actor to its Raise state? Does that automatically heal them when you do that? Or do I need to heal them some other way, like giving them an inventory item that heals them to full health?
The limited code I've got below just checks if the player has a target. If he does, it then checks the actor's health (if it's a corpse, it should be 0 or less, right?) If that condition is met, the actor is sent to a custom raise state where a friendly flag is set and the monster is healed to full health (like I said before, not sure the best way to do that last part either... if anyone has any ideas, I'd be in their debt...!)
Spoiler: