Log in to reply

Group fights

  • If I spawn 20+ people and split them up is it even possible to make them fight each other?
    I tried to do it with Menyoo but instead of fighting group vs group they decide to only target me.

    I also tried various bodyguard/gang mods but those require me to be a part of the fight, which im trying to avoid.

    Does anybody know something else I could try, or even a solution?

  • @RXMY Are you looking for a coding/script related solution?

  • @ashishcw After some searching, i figured it has to be coded.
    The thing is my coding is limited, I did find someones example script which could possibly work for me with a bit of changing of the code (which im doing right now).

  • @RXMY Oh okay, well good luck with it and if you face any hurdles, just raise the question on forum, as I am sure, many of us modders will be glad to help you further. Take care. (:

  • @ashishcw I have been messing around and trying to get atleast something going, but I guess my limited coding knowledge is not enough. And I was thinking is it possible to assign relationship groups to peds after they are spawned? Because that would allow me to skip the entire spawning part because I can do that manually.

  • @RXMY
    You can easily do stuff like that in Build a Mission without coding knowledge. Scripting it manually wouldn't be that easy.

  • @RXMY Hello RXMY, Well, I assume, assigning them a relationship group is where you stuck at?

    if that is the case, it is totally possible, to assign peds a relationship group before they are spawned. Here is a Code snippet from one of my ongoing mods.

    First, declare the ped and relationship type as a global variable, so later, you could use that variable anywhere in your code and not getting restricted to where have you declared it.

    For e.g.
    public class YOURSCRIPTNAME: Script
    Ped VIP;
    Ped PlayerPed;
    int playerviprelationship;


    Now, I want to assign a relationship to both these ped types.

    I will do this in one of my methods.

    playerviprelationship = World.AddRelationshipGroup("PLAYERVIPRELATION"); //This code simply adds the relationship group to GTA World.

    //Now simply assign both Player and Ped to the same Group.
    PlayerPed.RelationshipGroup = playerviprelationship;
    VIP.RelationshipGroup = playerviprelationship;

    //With below code, I get to declare who is leader and who is not
    GTA.Native.Function.Call(GTA.Native.Hash.SET_PED_AS_GROUP_LEADER, PlayerPed, playerviprelationship);

    GTA.Native.Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, VIP.Handle, playerviprelationship);

    So now Ped will always follow Player as a Bodyguard.

    Next time, please try to add your code snippet to make sure what's going wrong. That way it would be easy for us modders to read and pinpoint the wrong code.

    P.S. If you are new to scripthook coding I would recommend you to have a look at this native db. Its a bible for the modders who use scripthook as a plugin.

    Hope this helped. Take care. :)

  • this is definitely possible via editing a ped's relationship characteristics using create-a-mission or map editor like others have stated (or coding if you're capable of that stuff.. i'm certainly not), also: take a look at this thread to bypass the hard-coded AI limit present in the game by default


    that thread mainly discusses the AI during melee combat but I'm pretty sure one of the values InfamousSabre says to change also affects gunfighting as a whole. good luck, those gameconfig changes in that thread are absolutely essential to me nowadays

  • This post is deleted!

  • This post is deleted!

Log in to reply

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