Product Chat / Increasing the shooting range of AI Soldiers

Author
Message
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 20th Feb 2018 07:43
Under the right circumstances the AI can be quite decent!

The only problem is that it's too easy for the player to kill them from distance.

Can I increase the range in wich a soldier shoots at the player?

Increasing the View Range doesnt help...

I did look at the soldier scripts but they are all scattered around and rely partially on other scripts...
Tried everything now, maybe some of you have a hint for me
MooKai
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: World
Posted: 20th Feb 2018 13:53
You should look at the shooting distance from the weapon they use. Weapons also have a range limit.
Old school FPS fan, DOOM!!! Why GG not working on my AMIGA 500?
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 20th Feb 2018 14:04
Aye, Mookai's got a point, the range for characetrs is only the distance it can see you, it will move into range for attack, that range is set in the weapon itself as far as i know, so you need to look at the weapons gunspec file.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 20th Feb 2018 15:54
wow I never would have thought of that lol...

will check it out thanks guys !
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 20th Feb 2018 17:48
I've been thinking about hacking away a bit at the weapon play with enemies as i noticed a couple issues. For instance I think not only do we need some distance fixes but also some long range weapons should encourage the AI to actually step back or walk backwards out of "too close" proximity of the player before firing. For example the RPG rocket AI shoots you in the face at close range like its a hand gun.

In games like Fallout 3 all long range weapon AI have their enemies leave the "too-close" proximity circle before they can use their rockets and other long ranged weapons.
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 20th Feb 2018 17:49 Edited at: 20th Feb 2018 18:37
Okay I threw this little diagram together quick:

blue is close proximity that if the enemy is in, he should start to Move Backward
red is the shooting distance, when out of range he needs to Move Forward to this red circle in order to engage in combat

of course the red circle needs to perhaps be much larger as duke has requested. I'm going to see what i can do with some fiddling.

Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960

Attachments

Login to view attachments
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 20th Feb 2018 17:52
Absolutely agree, there should be a minimum range for certain weapons, and AI should retreat to that distance.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 20th Feb 2018 19:51
Yeah right, cool diagram T-bone lol
granada
Forum Support
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 20th Feb 2018 21:13
Nice if you can get it to work T-Bone

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 20th Feb 2018 21:50
if you use FireWeapon(e) then it's hard coded as there's a check in there for making sure the player can be seen and is within 1500 (GG) distance.
if you need a longer distance you will need to use raycasting and some sounds and decals etc to fake your own gun shot - there should be a sniper script somewhere that i made that has the raycasting done for longer range fire.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Login to post a reply

Server time is: 2024-11-24 07:19:41
Your offset time is: 2024-11-24 07:19:41