NPC Help
#1

Hi. Im trying to make a NPC that will move around and I will shoot at it. I've searched over forum and found [FS/INC] Attacking NPC.

But, I had many problems with it. Firstly with recording provided which i think is outdated cuz of 0.3b and secondly cuz of amount of health NPC has and it animations and "shooting". Its a nice script but what I want is to make NPC that will have realistic health(like full health and armour), take damage and do what I've recorded. If you guys could help me cuz Im not such good scripter. Here is my NPC filterscript.

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

public OnFilterScriptInit()
{
    ConnectNPC("Target", "route");
    return 1;
}
Reply
#2

so what you want =

a npc that shoot you
and also can be shot.

well i worked on npc's like that and making an npc shoot at a player would become very bugged and almost impossible to make it work perfectly.
However an npc that hits a player with a sword or knife or fists or whatever is a bit easyer.
-you will need a timer that checks players around the npc
-you need to record every hit the npc would make with his weapon (from front, left ,right and behind him)
(this is the part where the recordings could be bugged rom the attacking npc fs)
- i might be forgetting something but this is the basic somehow i guess

Now for the npc that is beging hit by you as a player;

-you need the npc to check if the player is shooting (for example:with key fire and aim)
-then you need to find a nice anim for it
- health system is very difficult you might be able to check how many times a player hits the npc and then make it die after 5 hits or something.

this is what you need to make this work and even IF it works it wouldnt be that perfect.
besides this might be to difficult for you to script (yet) i suggest you learn about using timers and checking if any players are near you as a player if you realy realy realy want to learn this.

Good Luck
Reply
#3

no i dont wanna npc to shoot me. Just tu make it able to get shot. And i kinda accomplished it but I dont know how to make it respawn after being killed
Reply
#4

Maybe try this
It allows you to kill the NPCs
Reply
#5

thanks...i finnaly made it =)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)