Hello, I am trying to find a way to allow turrets to hurt/kill the RoamingNPCs created by the RoamingNPCs plugin. Currently, the turrets track and target the RoamingNPCs, fire upon the RoamingNPC, however will do zero damage. Players are able kill the RoamingNPCs.
Trace from the turret:
From: AutoTurret, autoturret_deployed
To: BasePlayer, player
No exclusion found - looking up RuleSet...
Using RuleSet "default"
No match in pre-checks; evaluating RuleSet rules...
Initiator EntityGroup matches: traps
Target EntityGroup matches: players
Evaluating Rules...
Checking direct initiator->target rules...
Evaluating "traps->players"...
Match found; allow damage? False
Trace from a player:
From: BasePlayer, player
To: BasePlayer, player
No exclusion found - looking up RuleSet...
Using RuleSet "default"
Initiator or target is HumanNPC, with HumanNPCDamage flag set; allow and return
Thank you for any help.
Allow damage from turrets to Roaming NPCs by walkinrey
hi,
generally, the TruePVE config should not need to be changed to support other plugins. NPC plugins can be an exception, but that plugin exposes its NPCs only as BasePlayer rather than as a unique RoamingNPC type.
one way for the plugin to become compatible with TruePVE would be to define its own NPC class that inherits from BasePlayer, giving TruePVE a unique type it can identify in the npcs entity group instead.
another option would be for the plugin to implement the CanEntityTakeDamage hook, which is provided by TruePVE specifically for cases like this. this is advised, as it allows the plugin to override TruePVE and apply its own behavior where needed.