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 Scripts / Enemy A.I. Will not attack and fire weapon at player

Author
Message
The Eye of the Storm
16
Years of Service
User Offline
Joined: 1st Mar 2008
Location:
Posted: 1st Mar 2008 12:52
Hi there,

I am new to fps and have been spending most of my nights over the past week either in the forum or reading the manual looking for answers. So after reading your online tutorials, I still have some questions.



First...After I write or edit on a script in notepad, how do I save as fpi.? I cannot find Fpi as an option, either in save or save as.


Second- I am working on the second map of a large game. On both maps I have had trouble with the AI. Only some of the enemies will attack and fire their weapons. I followed the manual for main and shoot scripts and the scripts I used are the stock ones in the program. Some of the enemies will behave correctly, but most will not fire. I have them set as

Main- homing
Shoot-shoot
Rate of fire-0


Not much more simple than that. They will all come find me (player) but on the first map only 3 actually shoot and on the second...none of them will. I have deleted all of them and replaced with different characters with the same result.


I am running these scripts-


"Main"

;Artificial Intelligence Script

;Header

desc = Homing In behaviour

;Triggers

:state=0:rotatetoplr
:state=1:rotatetoplr
:plrcanbeseen,plrdistfurther=70:settarget,state=1
:noiseheard=5:rotateheadrandom=85
:random=10:rotateheadrandom=45
:state=1:movetotarget,animate=2
:state=1,plrdistwithin=61:freeze,animate=1,state=0
:plrdistwithin=50,rateoffire:plraddhealth=-5

;End of Script




"Shoot"


;Artificial Intelligence Script

;Header

desc = Look and Shoot

;Triggers

:state=0,plrcanbeseen:state=1,settarget
:losetarget=10:runfpidefault=1
:state=0:runfpidefault=1
:state=1:rotatetoplr
:state=1,ifweapon=1,plrcanbeseen=46,plringunsight,rateoffire:useweapon,rundecal=6
:state=1,ifweapon=0:state=2,setframe=6
:state=2:incframe=6
:state=2,frameatend=6:state=1,reloadweapon,sound=audiobank\guns\reload.wav

;End of Script









Any helpful ideas or suggestions would be greatly appriciated


thanks,

sungod

And even in our sleep, pain which cannot forget falls drop by drop upon the heart, until in our own despite, against our will, comes wisdom.
Zdrok
17
Years of Service
User Offline
Joined: 19th Dec 2006
Location: Pittsburgh
Posted: 1st Mar 2008 15:05
I'm not a scripter, but I CAN help you with you saving problem:
When you go to save a script in the correct directory file, first click on the drop-down button below the name of the script, and click on 'all files'. Then, name the script, and end it with .fpi, like in shoot.fpi. Hope this helps!
~AI

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 1st Mar 2008 16:01
Quote: "First...After I write or edit on a script in notepad, how do I save as fpi.? I cannot find Fpi as an option, either in save or save as. "


See video in download...

Right-click on your enemies and set ALWAYS ACTIVE to YES, so they'll all attack now......

Attachments

Login to view attachments
DonChaldo
16
Years of Service
User Offline
Joined: 24th Jan 2008
Location:
Posted: 1st Mar 2008 16:15
Ya I had that problem too. Thanks Coffee Grunt. You've been a big help to me sometimes.
The Eye of the Storm
16
Years of Service
User Offline
Joined: 1st Mar 2008
Location:
Posted: 2nd Mar 2008 01:58
Well cool, thanks. I was over thinking this problem. So I understand that all you do is save as, select all files and name the file with Fpi at the end and "BAM!" its fpi! Thats cool.

For the second issuse, I have already attempted that without any luck. They just seem to want to do everything but shoot me. Pacifists...a whole map of pasifists. If I cant get map to work I'll change the games name from Manhunters to Cindy's walk in the woods.

keep the suggestion comming...its 8pm and I'm just getting started, I will be scanning the forum and working on this till about 930 am so sending any help would be great.

thanks for your ideas.

sungod

And even in our sleep, pain which cannot forget falls drop by drop upon the heart, until in our own despite, against our will, comes wisdom.
The Eye of the Storm
16
Years of Service
User Offline
Joined: 1st Mar 2008
Location:
Posted: 2nd Mar 2008 07:08
I still cant get them to attack ...I did just upgrade to 1.07...could that effect anything?

And even in our sleep, pain which cannot forget falls drop by drop upon the heart, until in our own despite, against our will, comes wisdom.
The Eye of the Storm
16
Years of Service
User Offline
Joined: 1st Mar 2008
Location:
Posted: 2nd Mar 2008 07:15
Ok. this is interesting. So far i have been using the newer characters from some of the new model packs. In my frustration, I loaded one of the original zombie characters and it works just fine. does a reintstall of the model pack or a downgrade to a older version sound right?

And even in our sleep, pain which cannot forget falls drop by drop upon the heart, until in our own despite, against our will, comes wisdom.

Login to post a reply

Server time is: 2024-11-24 06:39:55
Your offset time is: 2024-11-24 06:39:55