Wondering Civilian NPC's -1 reply

Please wait...

Jalechah

1st class Noob

50 XP

4th March 2006

0 Uploads

586 Posts

0 Threads

#1 10 years ago

hey everyone. another question. this time more for the scripting side of things.

how would i go about making a NPC that wonders around a level with no weapons, and if attacked they run away. is this possible? if not whats the closest thing i could do?




Szico VII

We want FF7-2/remake!

50 XP

14th September 2003

0 Uploads

1,683 Posts

0 Threads

#2 10 years ago

Check out this tutorial by Lassev, it covers what you want and more!

Tutorials : Szico VII's Place




Jonny2199

Click >HERE< to find an idiot.

50 XP

18th September 2005

0 Uploads

1,046 Posts

0 Threads

#3 10 years ago

If you wanted something more simple (not sure it'd work in quite the same way...) Entities 220: Lesson 5 - NPC Spawning (it's not *just* spawning, it goes onto walking patterns)




lassev

Degenerate scripter

50 XP

21st June 2004

0 Uploads

847 Posts

0 Threads

#4 10 years ago

Behavior states wander and flee might serve you well. I haven't really tried bs_flee ever but if it works just set the NPCs' painscript to a script setting the BS to _flee.

Weaponless neutral NPCs might flee also automatically, though. Only if they carry weapons they turn hostile (obviously).




Jalechah

1st class Noob

50 XP

4th March 2006

0 Uploads

586 Posts

0 Threads

#5 10 years ago

well i was playing single player and i noticed that when u grip a soldier they drop their weapon and just walk around or run. Thanks for the sites guys, although i was hoping i could make a model a person, put together some kind of script file in the pk3 then just spawn him using the console and have the same effect. in future i would make a map where it has these guys but for now just to test it out