Jump to content

Tutorial: Making an NPC Hunt/Attack the player.


Vinze

Recommended Posts

Heya, this is a simple tut showing how to make an NPC that will hunt down the player.

 

First off, the NPC:

 

Make the NPC, how you make it inventory/apearance and stats wise... Does not matter. Just make sure to add it to a faction hostile towards the player. Either make a new one or give it something like, the bandit faction or something. Now, click the AI-button and set the agression to 85, 85 is a good number, because then it won't attack it's friends, and still be addled enough to go against the player...

 

Now, half of the work is done...

 

Time to package it...

 

...No, put down the gift-wrapper and listen...

 

Go to the top bar and click "Character", then "Packages". Right-click and select "New".

Then select the type as "Find". Now it's time to make some conditions...

 

Okay, there is a few examples here:

 

GetisMurderer == 1 < Enemy attacks when you murder someone.

GetPCInfamy == *Value* < Enemy attacks when your infamy matches the number.

GetCrimeGold == *Value* < Enemy attacks you when the bounty matches the number.

GetPCFame == *Value* < Enemy attacks you when your fame matches the number.

GetPCRace == 1 < Enemy attacks if the player is the race chosen in the parameters (You'll get that part when you actually look in the editor).

GetisSex == 1 < Enemy attacks the player when the sex matches the race choosen in the parameters.

GetisSleeping == 1 <Enemy will attack player while the player is asleep.

 

Now for the last part, the Target Tab...

 

Choose "Specific Referance", then Ref, then "PlayerRef", then that's it.

 

You can also edit the schedule if you wish, I think it's pretty self-explanatory.

 

Then drag the package to the list you can find when you click the AI-button on the NPC editing window.

 

Now, spawn the NPC someplace where it's hard to find and try it out.

 

PS: If any of you experienced modders find a slipup here, please let me know. But be mercifull. Kinda hard to keep every step in the head when you're not actually doing it >_<.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...