Title seems like it would be a popular task/request, yet I couldn't find a working solution, i hope someone can help.
Sometimes we can see a cop car chasing a car with peds doing a drive-by on their followers. Or we can observe how a random car clashes with a cop car, the cop car turns siren on, the cop exists, drags the driver out, shoots them, then moves on. These two examples are probably different things in terms of how they're implemented in game, the second scenario is probably more of what i need. I want cops to react like this to the criminals on vigilante mission.
I check if vigilante mission is active by manually setting a cleo variable from copcar thread. Criminals are created with pedtype 24. Here's what i tried.
1. 09B6: set_char_wanted_by_police [email protected] to 1 , inside copcar thread ped initialization. Does nothing (cops never reacted, regardless if they or criminals are on foot or in car).
2. 0746: set_acquaintance 4 of_actors_pedtype 6 to_actors_pedtype 24 , on vigilante mission initialization in copcar thread.
in my custom script,
inside loop (goes through all cops manually found around the player):
Also tried tasks 103, 104, 729, 1103. At least one of them made cops on foot attempt to shoot or drag out the target, but cops inside cars never reacted.
I guess i'll end up emulating cop behavior myself, but it would be much nicer to reuse the already existing cop behavior towards "criminals" who happen to bump into (or get bumped by) cop cars. Does anyone know how to get this to work? Am i doing something wrong in my examples?
Somewhat related, currently i'm performing a lot of ped-related things on each iteration of the loop, and many of those things would better be done only once, on ped initialization. Does anyone know any unused address in ped struct, so that i could store a flag in it to avoid unnecessary procedures on each loop iteration?