TARDIS icon indicating copy to clipboard operation
TARDIS copied to clipboard

Hostile or scared NPCs

Open parar020100 opened this issue 3 years ago • 7 comments

Currently, if you go theough a portal, all NPCs just forget that you exist. This is neither realistic nor reasonable - it's just too op. TARDIS itself would have much more to do with if you could fight monsters with it.

I suggest the following optional behaviours (they could be disabled in settings):

  • Make hostile NPCs hostile to all player's TARDISes by default
    • In this case, when you're away from the TARDIS, there's a chance for it to be broken by someone
      • is it a problem or a feature?
      • it would make HADS very useful
      • a new shield system (suggested in #371) will make it less likely to really be destroyed
  • Make NPCs hostile only when player is inside
    • This could be harder to code
    • We need a hook for player entering the TARDIS, check on all NPCs in a radius and make them hostile to the TARDIS
    • HADS wouldn't be much of use just like now (unless you're sleeping inside your TARDIS, other players don't count)
  • Make NPCs hostile to TARDISes if the player has been inside them, but might not be now

It also would be fun if we could make hostile NPCs follow through the portal But idk what to do with striders, hellicariers and other huge ones. Is there a way to seperate walking normal-sized ones with standard behaviour?

Another suggested thought was to make NPCs attack the TARDIS when it's idle but fear it when it's in flight (like antilons fear the thumper)

parar020100 avatar Mar 02 '21 08:03 parar020100

Personally, I prefer option 1 or 3, but this is up for discussion

parar020100 avatar Mar 02 '21 10:03 parar020100

Relates to #153

parar020100 avatar Mar 22 '21 08:03 parar020100

https://user-images.githubusercontent.com/22155199/112973059-d01a7600-9148-11eb-9901-77d5053b3948.mp4

The Legacy TARDIS has NPC's target the exterior but not attack it, where the rewrite has the NPC ignore the portal and aim at the player in the sky.

It might also be worth the enemies stop targeting people if the exterior has gone into the vortex.

Brundoob avatar Mar 30 '21 10:03 Brundoob

Note with your example @Brundoob that's only happening in the legacy because you're in third person mode which enables this feature, just being inside would result in the same behaviour I think.

MattJeanes avatar Mar 30 '21 15:03 MattJeanes

From Matt:

i think there is a way in gmod lua to make entities hostile directly towards something, proxy npc is defo hacky believe legacy has some code for it can't remember what it is https://wiki.facepunch.com/gmod/NPC:AddEntityRelationship

parar020100 avatar Nov 30 '21 06:11 parar020100

Might need to gather all the entities targetting a player once they enter the TARDIS, and make them target the exterior instead. This won't help NPCs aim through the portal though, and it might break if they try to go through.

francodml avatar Nov 30 '21 21:11 francodml

I'm not sure if it's possible, but you could have them switch to aim at the portal when the player is in the interior and they are not, and then have them switch back to the player if they are both in the interior. Same would go for exterior, they can aim for the portal if they are in and player is out

Brundoob avatar Dec 01 '21 12:12 Brundoob