If you like to write, there will inevitably come a time when people you know in real life read your work. These people might be friends, family, coworkers, or acquaintances. Inevitably, these people might try to project themselves into your work. “Hey, I think Character X is a lot like me. Did you base that character off me?” So you admit, it’s true. You did base Character X off Friend Y, and if this character is a protagonist, they are flattered. But if this character suddenly turns the corner and does something terrible, then you run the risk of getting Friend Y all mad at you. “I would never do something like that! Why did you write that?”
I base characters off people I know all the time. I might borrow a few little things, like the person’s fashion sense or speech habits, or even their name. But I don’t actively think while I’m writing, “Hmm… what would Friend Y do in this situation?” I think something like, “What would Character X do?”
So just because I happen to kill off a character I base off you, it doesn’t mean I hate your guts and that I’m planning to kill you in real life. It means that, for the sake of the story, I had to kill off a character, and the one I chose happened to be the one that had some of your traits. It’s not like I have a personal vendetta against you.
Many times, when I let people I know in real life read what I’ve written, I find that they try too hard to figure out which character is based off them and they overanalyze everything that character does, so they may not be the most objective readers for the story. So that’s why I put my writing on the Internet; I can get a more objective take.
But I think it is a compliment if a writer bases a character off you, even if that character turns out to be evil. In my case, it means that some aspect of a person’s personality or physical appearance inspired me.
Moral of the story: If a writer you know puts a character into a story that reminds you of yourself, be flattered, but do not be offended.