Sign in to follow this  
Followers 0
Emton

How to make custom AI character?

8 posts in this topic

Posted (edited)

Hello I need an NPC character I can place that is: Immobile, invincible, has unlimited ammo and shoots only at east side. How should I go about this and also be able to place it simply wherever I need to?

Edited by Emton

Share this post


Link to post
Share on other sites

By "place it wherever", do you mean during gameplay, by a client, or by the server admin / owner?

Share this post


Link to post
Share on other sites
Advertisement

Oh yes I mean placing it for the server (like another NPC/trader) I guess that would be the initPlayerLocal.sqf but how you think I can define these rules?

Share this post


Link to post
Share on other sites

Oi, I'm not sure about the whole creating an AI locally thing that actually targets players.  Anyhow, you need to look at the Client Function for creating the trader.  From there you can see some of the commands that are used to create the trader and set their behavior.  The client function is: 

ExileClient_object_trader_create

To do what you want, at least as a first test, is create your own function that allows for for the AI to still target and whatnot.  I'm not very familiar with the AI commands, but they're probably fairly documented on the BIKI.  

You will need to understand how side relations work in order to target a specific side, so read this article:

https://community.bistudio.com/wiki/Side_relations

 

Hope this is helpful for you!

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

Thanks I'll look at some of that, this NPC I'm thinking of is to act as a guard for non-safezone traders where there's zombies (so the player has time to buy and so it doesn't look so funny having unarmed traders in zombie infested areas, +1 immersion)

Edit: Ah I'm thinking this isn't the best idea now if players can lure the zombs to the guard, I think I'll just move the traders a little farther from the loot.... But this could still be a useful feature for other stuff....

Edited by Emton

Share this post


Link to post
Share on other sites

As heads up, I used "Occupation" by @second_coming for this exact purpose. I placed static AI spawns (Survivors, not Bandits) at my unsecure trader zones and they attack the zeds for the players. They will turn on the players if they shoot at the guards.

1 person likes this

Share this post


Link to post
Share on other sites
1 hour ago, kuplion said:

As heads up, I used "Occupation" by @second_coming for this exact purpose. I placed static AI spawns (Survivors, not Bandits) at my unsecure trader zones and they attack the zeds for the players. They will turn on the players if they shoot at the guards.

Yea I was thinking I could turn off "zombies disappear at safezones" and let the guard shoot them, just for fun. But did you totally disable the safezone for players (let the bullets cause damage)? Well I'll look into that mod thx

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.