SRTT Make NPCs use melee or a firearm when you do.

Hey,

I have been thinking about this one lately. Would it be possible to make NPCs use their firearms while you have a weapon equiped but when you switch to your fists, enemies also switch to their fists.

If it could, that would be amazing. I would like cops to use their fists when you are unarmed but switch to their pistol from the moment you grab one yourself. This should only be at notoriety level 1.

This is also for my mod, if the above could be accomplished, I could merge the first two notoriety levels I created togheter, which would allow me to move what is now level 3 to 2, level 4 to 3 and level 5 to 4, which means that I could add something new for the 5th level, most likely the SNG.
 
Hmm that is impossible if we try to modify any .xtbl file,nothing like that is coordinated in a .xtbl.

The only solution would be a script.There is already a function which returns the current item the player is equipped with and a simple thread to monitor that would do it,under the condition of the notoriety level to be 1(there's also a function for that).All that's left is to change the behavior of the npcs that attack you so as to holster their weapon when you use your fists,which is fortunately possible.

The big problem:The cops shooting you are not scripted entities,which indicates that there's no way to use them as a reference for the certain script functions.

Sorry for putting your dream to an end...:(
 
Hmm that is impossible if we try to modify any .xtbl file,nothing like that is coordinated in a .xtbl.

The only solution would be a script.There is already a function which returns the current item the player is equipped with and a simple thread to monitor that would do it,under the condition of the notoriety level to be 1(there's also a function for that).All that's left is to change the behavior of the npcs that attack you so as to holster their weapon when you use your fists,which is fortunately possible.

The big problem:The cops shooting you are not scripted entities,which indicates that there's no way to use them as a reference for the certain script functions.

Sorry for putting your dream to an end...:(

If its not possible, then its not, no worries ;)

Wouldn't it be possible to make the script instead of scripted entities, detect all characters currently loaded ingame which are in this case the cops (in characters.xtbl that is 'npc_cop', 'npc_cop_jones', 'npc_cop_motorcycle01',...) or all characters that have the model of the cop 'npc_cop' and 'npc_cop_austin' and let the script take effect on those?

If that doesn't work then, I don't know if you saw it before, but a few pages back in the 'ask volition' section I asked if it was possible to make cops shoot out of their cars at a notoriety of 4 or higher. And that was possible, though the script also doesn't detect scripted entities, but just works with the 'teams', in this case 'police'. That script made all characters ingame that were in the team 'police' shoot out of their vehicles, perhaps that could prove usefull? Working with the teams?

This is the thread I was talking about:
http://www.saintsrowmods.com/forum/threads/npcs-shoot-out-of-car.2664/

Idk if any of this is possible, but I'm just trying to help ;) You never know we stumble on something ;)
 
This isn't possible currently, but it is possible that could be added as a lua function. This hinges on how easy it would be to disarm cops from code though.
 
This isn't possible currently, but it is possible that could be added as a lua function. This hinges on how easy it would be to disarm cops from code though.

Oh, so this will be possible in the future then?

And well, all cops can have a firearm with them and draw it and holster it if you have notoriety or not. The only thing we just need is to make the game also do this when you are armed or unarmed.

Right now I simply let cops spawn at notoriety level 1 which attack you with tasers or their fists and from the moment you shoot and hit a cop or a civilian the notoriety raises to 2 and the cops that show up then have pistols. I do think you understand that, though this works really well, it would be much cooler if the level 1 cops would draw their own pistols.
 
Back
Top