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 / FPSC AI Realism

Author
Message
TheConnorian
16
Years of Service
User Offline
Joined: 18th Dec 2009
Location: I\'m in ur game, pwning ur noobs
Posted: 4th Dec 2010 20:52
can you make the AI in the games shoot more realistically because from what I've seen they will always hit you nearly every time, can you not make it so that they are inaccurate unless you are right in their face and by the way does the accuracy of the weapon they're holding come into it at all!

thanks to any who can help.
Gencheff
16
Years of Service
User Offline
Joined: 12th Jun 2010
Location: UK by way of USSR
Posted: 4th Dec 2010 23:37 Edited at: 4th Dec 2010 23:40
You know this is a very good question.I've been wondering the same myself.

When I gave it some thought and took a look at one of the shoot scripts,I came to a conclusion,yes you can.However you would need a custom script for the enemies.The default ones will need way too much editing.

Essentially what you need to do is add a few lines of code which will determine wether the player was shot or not and then remove from his health.Also you'll need to command the entity to draw and shoot his weapon.

:state=1,ifweapon=1:rotatetoplr,settarget,useweapon,state=2

:state=2,random=2,rateoffire:plraddhealth=-12
:state=2,random=3,rateoffire:plraddhealth=-14
:state=2:state=1


So to brake this down,after the weapon is being shot , if a random number from 1 to 3 is x then plrhealth is substracted by 14 (or 12 for 1 to 2 for variety in damage).Then immediately the script tells the state to switch back to 1 to shoot the player again.This is a loop and every time the gun is shot it's checked randomly for accuracy

This should give you an idea how to achieve what you want

TheConnorian
16
Years of Service
User Offline
Joined: 18th Dec 2009
Location: I\'m in ur game, pwning ur noobs
Posted: 5th Dec 2010 01:12
Youve basically answered my question but could i make their weapons do the same amount of damage as the players if they both had the same weapon, by the way could you do it then say choose random 1-6, if 1 or 2=no damage, if 3=half weapon damage (illustrates hitting say the skin and it only taking a bit of flesh off or just hitting armour and slightly going through), if 4,5=full weapon damage (shows a direct hit on the player)or 6=double weapon damage (show a hit on a vital area).

just an idea though.
GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 5th Dec 2010 03:43
Awesome was trying to figure this out the other day. good fix ty

======================================

GreenDixy Productions http://GreenDixy.Com
TheConnorian
16
Years of Service
User Offline
Joined: 18th Dec 2009
Location: I\'m in ur game, pwning ur noobs
Posted: 5th Dec 2010 11:57
By the way if you want to maybe expand the subject or maybe suggest answers to these ideas then please post.

Login to post a reply

Server time is: 2026-07-01 22:13:19
Your offset time is: 2026-07-01 22:13:19