Jump to content

Make Ped Shooting On Next Peds


JackNorris

Recommended Posts

Hello,

 

I'm confused why the spawned ped does not shoot at me:
 

public override bool OnCalloutAccepted()
{
  suspects[0] = new Ped("a_f_m_bodybuild_01", new Vector3(-466.5565f, -700.2243f, 20.03186f), 219.2955f);
  suspects[0].Inventory.GiveNewWeapon("WEAPON_CARBINERIFLE", 200, true);
  suspects[0].RelationshipGroup = "TerroristSubway";

  Game.SetRelationshipBetweenRelationshipGroups("TerroristSubway", "COP", Relationship.Hate);
  Game.SetRelationshipBetweenRelationshipGroups("COP", "TerroristSubway", Relationship.Hate);
}

public override void Process()
{
  for(int i=0; i<suspects.Length; i++)
  {
    suspects[i].Tasks.FightAgainstClosestHatedTarget(10);
  }
}

 

I thought this could be easyer than using the FightAgainst task by iterating through all other peds.

What is my mistake?

Thanks in advance.

Edited by JackNorris
Link to comment
Share on other sites

Thank you for your answer!
But that does not seem to be the only mistake. They still do not shoot at me.

I noticed an odd behavior: When I reload all plugins by ReloadPlugins they begin shooting at me. Maybe that could be the key to find the cause.

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...