how do i make the spawned scientist not hostile towards me?
Making AI not attack player or be hostile?Solved
i got him not hostile but if he was how would i make him ignore me?
object OnNpcTarget(BaseNpc npc, BaseEntity entity) { return true; }
he is still shooting me.
Merged post
also tried
Merged post
Seems its not making the call when he targets me.
Merged post
I have even tried with no luck
Merged post
got that solved but i get error spaming when invis.
private object OnNpcTarget(NPCPlayerApex entity, BaseEntity target)
{
BasePlayer player = target?.ToPlayer();
if (entity == null || player == null)
return null;
return true;
}Merged post
also tried
private object OnNpcTarget(NPCPlayerApex entity, BaseEntity target)
{
var npcAi = entity.GetComponent<NpcAI>();
BasePlayer player = target?.ToPlayer();
if (entity == null || player == null || npcAi.owner.player != player)
return null;
return true;
}
Merged post
Seems its not making the call when he targets me.
Merged post
I have even tried with no luck
private object OnNpcTarget(BaseNpc npc, BaseEntity entity)
{
BasePlayer basePlayer = entity as BasePlayer;
if (npc != null)
{
return true;
Puts("test");
}
Puts("test");
return null;
}Merged post
got that solved but i get error spaming when invis.
| Calling hook OnNpcPlayerTarget resulted in a conflict between the following plugins: Vanish - True (Boolean), Bot (False (Boolean))
Ts3hosting| Calling hook OnNpcPlayerTarget resulted in a conflict between the following plugins: Vanish - True (Boolean), Bot (False (Boolean))
Return true, not false.
Locked automatically