Actor#getInteractingEntity vs getTarget

Discussion in 'Programming & Hardware' started by Cloud, Nov 4, 2014.

  1. The api currently includes Actor#getInteractingEntity, I want to rename it to getTarget. Before I do this change I want feedback, and as much as possible. So please, express your opinions and feel free to add or debate anything in this list. I really want to get this method renamed, so if getTarget doesn't satisfy you, I'd like an alternative.

    • getTarget more accurately reflects that it's a one way interaction
    • It's primarily used for combat
    • It's short and easy to understand
    • getInteractingEntity more accurately reflects that it can also store the entity your talking to or trying to pick pocket
  2. I don't see what the problem is with keeping it #getInteractingEntity?

    1: You are calling getInteractingEntity on an Actor, anyone with half a brain would understand that it is an one way interaction (a player can be attacked by a npc but that doesn't mean the player is interacting with the npc)
    2: Like you said at your cons there are multiple ways to utilize the method
    3: What's difficult to understand about interacting entity?
  3. It's just not 100% accurate. We had a semi-heated skype discussion about it yesterday and we did a bunch of research to try to figure out exactly what words would be both accurate and common enough for simple usage. Things we considered were target, focus, fixation, and many variations. At the end the one that I'm preferring best is getTarget.
  4. What about the best of both worlds? Actor#interactionTarget

Share This Page