Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / How too make civilian react properly?

Author
Message
gigk9
12
Years of Service
User Offline
Joined: 3rd Apr 2013
Location:
Posted: 3rd Apr 2013 18:47
This is probably a stupid question but I have not been able too figure this out on my own, Pretty much I have the player entering a level and there are a bunch of civilians around, The security guards react properly and shoot at the player but the civilian's just stand there unless you shoot them then they run and such, How can I make it so the civilians run as soon as the player enters the level as it looks kinda dumb that they just stand there and do nothing till you shoot them
Nomad Soul
Moderator
18
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 5th Apr 2013 00:23
This would need to be a custom script.

Or you could setup a triggerzone just before the player enters the room and have the civilians spawn and follow waypoints to give the impression of fleeing the area. You can set their speed properties etc.

A custom script would need to be plrdistancewithin=X or something like that and then conditions for following waypoints etc.

Wolf
17
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 5th Apr 2013 02:45
This should do it:

Quote: ";Artificial Intelligence Script

;Header

desc = Follow Waypoints, Run Away If Player is nearby

;Triggers

:waypointstate=0:animate=5,waypointstart
:waypointstate=3:animate=5,waypointnext
:waypointstate=4:animate=5,waypointrandom
:waypointstate=5:animate=5,waypointreverse
:nearactivatable=0:settarget,activatetarget=2
:random=20:rotateheadrandom=65
:plrdistwithin=599,plrcanbeseen:settarget,state=2

:state=2:rotatetotarget,rotatey=180,resethead,waypointstop,animate=5,state=3
:state=3:runfore=10
:state=3,random=5:rotateheadrandom=85
:state=3,losetarget=10:state=10
:state=3,plrcanbeseen:settarget,state=2

:state=10:timerstart,state=11,rotatey=180,animate=31
:state=11,timergreater=5000:state=0,animate=5,waypointstart
:state=11,random=5:rotateheadrandom=35

;End of Script
"


That should work


Quote: " How can I make it so the civilians run as soon as the player enters the level as it looks kinda dumb that they just stand there and do nothing till you shoot them "


You can also make them do something, even though that would require a bit more scripting.

http://www.serygalacaffeine.com
Without struggle,no progress and no result.Every breaking of habit produces a change in the machine.
gigk9
12
Years of Service
User Offline
Joined: 3rd Apr 2013
Location:
Posted: 5th Apr 2013 17:04
That worked perfectly, Thank you!

Login to post a reply

Server time is: 2025-08-08 21:00:51
Your offset time is: 2025-08-08 21:00:51