Jump to content

How do I get more than 3 peds to attack the player?


luckylavs

Recommended Posts

In my "OnKeyDown" function, I create a bunch of peds, give them a weapon, and tell them to fight against the player.

For example, to spawn my ped called npc1:

 

var npc1 = World.CreatePed(PedHash.Beach01AFY, Game.Player.Character.GetOffsetInWorldCoords(new Vector3(0, 10, 0)));
npc1.Weapons.Give(WeaponHash.Machete, 1, true, true);

npc1.Task.FightAgainst(Game.Player.Character);

 

 

The problem is, in the game -- only 3 of them will chase the main player at a time. 

The other ones that spawn, get their weapon okay, but they just stand there and watch.

 

Anyone have an idea?

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...