Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (84,674 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

julionib

Help with Ped behavior

Recommended Posts

julionib

The question is: How i can avoid an unarmed ped (unarmed/knife) from fleeing?

 

my HULK script has a enemy feature, but my enemy ped starts to flee and i need to restart the tasks to attack sorrounding peds.

 

so, it's possible to make the ped more suicide? make him attack with melee even if we are shooting them?

 

also, it's possible to avoid the euphoria body balance? this is anothr issue that i had, when the ped is running and we shoot him he fall because of the body balance euphoria

Share this post


Link to post
Share on other sites
pedro2555

For the first problem, I«ve faced the samething just with cars. I wanted a ped to flee away from police cars with siren (police pursuit). I tried FLEE_FROM_CHAR and FLEE_FROMCHAR_ANY_MEANS but it always started to flee away and a second later, because of the police sirens, he just parked on the side of the road.

 

The solution? run it every tick. Works perfect.

 

if (isPursuitOngoing)

FLEE_FROM_CHAR_ANY_MEANS();

 

Maybe this solution fits your problem.

 

To prevent the euphoria stuff I might have seen a native for that. Or maybe don't load colisions.

Share this post


Link to post
Share on other sites
julionib

but i need to avoid the flee, he must keep attacking

Share this post


Link to post
Share on other sites
pedro2555

What task are you calling exactly?

 

Not sure what all this does, but maybe

SET_CHAR_SPHERE_DEFENSIVE_AREA,

SET_DECISION_MAKER_ATTRIBUTE_TARGET_INJURED_REACTION,

SET_DECISION_MAKER_ATTRIBUTE_TARGET_LOSS_RESPONSE,

SET_DECISION_MAKER_ATTRIBUTE_RETREATING_BEHAVIOUR,

SET_DECISION_MAKER_ATTRIBUTE_CAN_CHANGE_TARGET.

 

I haven't tested none of them for your case.

 

For the euphoria thingy maybe

SET_CHAR_SUFFERS_CRITICAL_HITS,

SET_COLLIDE_WITH_PEDS,

SET_DONT_ACTIVATE_RAGDOLL_FROM_PLAYER_IMPACT.

 

And while looking aroung, it maybe cool

SET_CHAR_SHOOT_RATE.

Edited by pedro2555

Share this post


Link to post
Share on other sites
julionib

thx, i will make some tests

Share this post


Link to post
Share on other sites
AgentWD40

you would use these natives but decision maker doesn't seem to work anymore with the updated scripthook.net or it must be implemented a different way... i've gotten to the point where police would run up to my first spotted coordinates then idle, even though it work perfectly in sco Shifty41s_beerhatsmilie2.gif

 

 

 

DecisionMaker dm, cdm;//int dm,cdm;GTA.Native.Function.Call("LOAD_CHAR_DECISION_MAKER", 2, dm); GTA.Native.Function.Call("LOAD_COMBAT_DECISION_MAKER", 3, cdm); GTA.Native.Function.Call("SET_DECISION_MAKER_ATTRIBUTE_SIGHT_RANGE", dm, 250);GTA.Native.Function.Call("SET_DECISION_MAKER_ATTRIBUTE_SIGHT_RANGE(dm, 250);//LOAD_CHAR_DECISION_MAKER(2, &dm); //LOAD_COMBAT_DECISION_MAKER(3, &cdm); //SET_DECISION_MAKER_ATTRIBUTE_SIGHT_RANGE(dm, 250);//SET_DECISION_MAKER_ATTRIBUTE_SIGHT_RANGE(cdm, 250);GTA.Native.Function.Call("SET_CAN_TARGET_CHAR_WITHOUT_LOS", ped, true);GTA.Native.Function.Call("SET_CHAR_DECISION_MAKER", ped, dm);GTA.Native.Function.Call("SET_COMBAT_DECISION_MAKER", ped, cdm);GTA.Native.Function.Call("SET_DECISION_MAKER_ATTRIBUTE_CAUTION", dm, 2);GTA.Native.Function.Call("SET_DECISION_MAKER_ATTRIBUTE_CAUTION", cdm, 2);GTA.Native.Function.Call("SET_PED_IS_BLIND_RAGING", ped, true);//SET_CAN_TARGET_CHAR_WITHOUT_LOS(ped, true);//SET_CHAR_DECISION_MAKER(ped, dm);//SET_COMBAT_DECISION_MAKER(ped, cdm);            //SET_PED_IS_BLIND_RAGING(ped, true);GTA.Native.Function.Call("TASK_COMBAT", ped, Player.Character);//TASK_COMBAT(ped, theplayer);

 

Edited by hardsty1e

Share this post


Link to post
Share on other sites
julionib

thx, i will test and let you know the results

Share this post


Link to post
Share on other sites
InfamousSabre

I've noticed while on a shooting spree, bouncers will chase and melee attack me, even though I'm armed. Maybe that will help, if you haven't already figured it out.

 

thx, i will test and let you know the results

So what are the results??

Share this post


Link to post
Share on other sites
julionib

lol, i forgot to say, didnt resulted in what i need, ped still fleeing, maybe im doing something wrong

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.