Log in to reply
 

How do I make a ped not engage in combat whilst moving to a specific position?



  • What I am trying to do is move a spawned pedestrian/bodyguard from point a to point b; The only problem I am getting is that when he gets shot at or if I get shot at when the bodyguard is in the process of moving to point b he engages back at the enemy and does not complete the Task of going to point b.

    Does anyone know how to do this?



  • If you are coding in C#, how about using below right after create ped ? I mean right after writing “World.CreatePed”.

    if (ped != null && ped.Exists())
    {
    ped.AlwaysKeepTask = true;
    ped.BlockPermenantEvents = true;
    }

    It seems the order of assignments matters.
    Equivalence in C++ might be:

    PED::SET_PED_KEEP_TASK(ped, true);
    PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true);

    I’ve only coded in C#, so I’m not sure about C++ one.



  • Not working, they still engage into combat when getting shot. I'm trying to make the bodyguards not engage into combat when moving from point a to point b.



  • I also have a question.
    How do I make the spawned ped/bodyguard not follow me?


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.