Log in to reply
 

Make AI use of vehicle weapons



  • hi,

    anyone who knows more about GTA V AI could answer this for me please:

    Is it possible to make the AI use all of the vehicle weapons against you? For example the jets: Can a mod make the AI use both, gun and missile against you?
    And if bombs are added to a plane or if the AI uses addon planes which has bombs, can AI use them against you ?

    RDE for example spawns the savage helicopter at 5 stars, but AI uses none of the weapons, which is sad



  • @shephart Less information is provided. Kindly confirm are you trying to use the script made in SHP (Script Hook) or RPH(Rage Plugin Hook).

    If you are using ScriptHook plugin, did you try the natives?

    Here are few natives which might be helpful for your AI weapon usage.

    CONTROL_MOUNTED_WEAPON(This is a Boolean value, which checks and forces the Ped(AI) to use the mounted weapon)

    For your second requirement
    Is it possible to make the AI use all of the vehicle weapons against you?

    Yes, it is possible, you can use SET_MOUNTED_WEAPON_TARGET native. This native uses, below parameters,

    Ped shootingPed(Your AI Ped)
    Ped targetPed(Your Player Character)
    Vehicle targetVehicle

    float x (Seems to be Radius)
    float y (Seems to be Radius)
    float z (Seems to be Radius)

    If you are using ScriptHookV Plugin, You will find this link more helpful. It has almost all the native collections and their usage explained.
    http://www.dev-c.com/nativedb/

    Hope this helps.

    And for the future references, please try to be more elaborative so people can provide you their assistance in a better way. (:

    Happy coding.



  • @ashishcw I've been having the same question about getting the AI (most specifically soldiers) to use vehicle weapons against me, during a max 5-star wanted level, i.e. manning the Menacer's roof turret, or making the Savage (or even the Hunter) fire missiles at the player. I'm asking you this, since most people won't answer my question for crap.



  • @MarineMan2016 Hello there MarineMan, Though, I didn't use the AI using weapons against me, but I am very much sure, it can be achieved. As I mentioned it earlier, the native forces the ped to use the specific weapon if it has one. Check this for instance, As I am working on my current mod, where for the testing purpose, I am using my AI assistants to use machine gun on Turreted Limo. They kill the enemy using that gun. xD

    In your case, or OP question, the target needs to be Player-Character, and I am sure, it will work.!


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.