crossed99 43 Posted October 30, 2021 Share Posted October 30, 2021 Anyone know how to make PEDs ignore dead bodies? Normally they walk up to the body then walk away, like they're fleeing (but only walking, not running) and they will do this instead of what I'm telling them to do. Thanks! Quote Link to comment Share on other sites More sharing options...
HughJanus 244 Posted October 31, 2021 Share Posted October 31, 2021 I suppose you already tried stopping the unwanted task? Quote Link to comment Share on other sites More sharing options...
crossed99 43 Posted October 31, 2021 Author Share Posted October 31, 2021 I think it's task 532. I tried something like: if (TASK::GET_IS_TASK_ACTIVE(ped, 532)) TASK::CLEAR_PED_TASKS(ped, 1, 1); and it prevents them from randomly walking away, but sometimes they get locked up just staring at the corpse, I guess because task 532 is only thing they want to do and I'm keep cancelling it, so it doesn't work very well. Or is there a better way to do this? Quote Link to comment Share on other sites More sharing options...
LMS 674 Posted November 1, 2021 Share Posted November 1, 2021 It might be a shocking event that causes them to walk up to the body. Try removing/suppressing those. Quote Link to comment Share on other sites More sharing options...
crossed99 43 Posted November 1, 2021 Author Share Posted November 1, 2021 11 hours ago, LMS said: It might be a shocking event that causes them to walk up to the body. Try removing/suppressing those. I tried, but I couldn't make it work.. I also tried this: IS_SHOCKING_EVENT_IN_SPHERE looping through all the events from here: https://alloc8or.re/rdr3/doc/enums/eEventType.txt , but none of those seem to exist near the corpse somehow.. Enabling this works though: SET_BLOCKING_OF_NON_TEMPORARY_EVENTS, which would suggest it's some sort of event after all I guess, so idk, but this one also makes the ped ignore a lot of other things. Also, making the ped a sanctioned shooter (?) seem to prevent them from freaking out: PED::SET_PED_CONFIG_FLAG(ped, 347, true); Not sure what else this does to them though. Anyway, I can probably work with these, thanks both of you! If anyone else has ideas they'd be still welcome! Quote Link to comment Share on other sites More sharing options...
HughJanus 244 Posted November 4, 2021 Share Posted November 4, 2021 On 10/31/2021 at 10:13 PM, crossed99 said: I think it's task 532. I tried something like: if (TASK::GET_IS_TASK_ACTIVE(ped, 532)) TASK::CLEAR_PED_TASKS(ped, 1, 1); and it prevents them from randomly walking away, but sometimes they get locked up just staring at the corpse, I guess because task 532 is only thing they want to do and I'm keep cancelling it, so it doesn't work very well. Or is there a better way to do this? There are also functions for cancelling tasks "immediately" and cancelling "secondary" tasks. In PDO I use the "immediately" function for some purposes - after cancelling one task, I give NPCs another one (this way the old one does not get triggered again). But I guess you have already tried that :/ Quote Link to comment Share on other sites More sharing options...
crossed99 43 Posted November 4, 2021 Author Share Posted November 4, 2021 I haven't tried cancelling secondary tasks, I always forget that that's a thing, I'll give it a try, thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.