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 / [SOLVED] FPSC AI Going crazy at long ranges.

Author
Message
CornelisJ12
4
Years of Service
User Offline
Joined: 2nd Dec 2016
Location:
Posted: 15th Jan 2021 19:46
Hey everyone

I recently have been getting into FPSC again and am working on a ww2 game as a hobby.
I only now ran into a problem while creating some outdoor levels, mainly with the AI.
The problem is that when the ai can see the player from far away their fire rate goes crazy. When the player is in around 15 meters of the ai it functions fine and shoots normally but as soon as the player is further away and the
main script allows the player to be detected at that range they start shooting at a crazy fast rate and instantly kill the player. The only workaround I have found so far is to limit the range in which the ai can detect the player altho this is a bad solution as the ai
just sort of stands around till the player is really close. I have tried various different ai main and shoot scripts and they all have this issue.

Anybody know a solution to have the ai be able te start shooting from far away but not go crazy?

Sincerely
Dan

The author of this post has marked a post as an answer.

Go to answer

ScooT9
4
Years of Service
User Offline
Joined: 29th Mar 2017
Playing: Terrorist Takedown 2 (a really cool game)
Posted: 15th Jan 2021 22:03
This post has been marked by the post author as the answer.
right click on the entity, and scroll down until you find "Always Active". set that to "yes" and the enemy should be working fine. good luck with your game!
hi, i'm a random guy who's making random games with random game engines for random reasons

ncmako
9
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 15th Jan 2021 22:06 Edited at: 15th Jan 2021 22:07
Hello Cornelis First which version of fpsc are you using? Any mods?
Adjusting the script with plrdistwithin=x is a good start. It also sounds like you have a lot of wide open space if you can see
the npc just standing around until player gets closer. Can you "block" the view at all or do you like it all open?
Maybe Dark AI can help here, have you tried using it before.
Also, consider joining us a Discord fpsc, we have a very large number of members now with a wealth of knowledge in fpsc.
I'm sure someone can help in this matter there. Several members now are making ww2 games

Haha I see Scoot beat me to this one
** WHERE'S MY eXplosys ? **

Login to post a reply

Server time is: 2021-09-24 20:05:08
Your offset time is: 2021-09-24 20:05:08