Scripts / AI damages object?

Author
Message
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 27th Feb 2022 02:42
Anyone know if there's some way to discover if AI weapon fire
damages the walls or barrels you are hiding behind?
Would be a little bit cool me supposes.
... sounds like a tough one, but life is tough these years.

Alternatively how to determine if any particular AI is confronting player with attack?
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 27th Feb 2022 18:59 Edited at: 27th Feb 2022 19:02
the AI don't fire real bullets, it's instant, they will only hit the player and only fire if the shot is valid - i.e. it's impossible for them to hit cover or obstacles as they won't fire at all if you are behind something (unless the obstacle doesn't register as an obstacle and if so the player would take damage)
if they "miss" it simply doesn't do damage but the shot would still need to be a valid shot when calculated

you would need to do some custom function in the AI to check if they fired / attacked and then you could work it out from there based on the player health change i guess
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 27th Feb 2022 22:46
Yeah, thanks small_g. That's what I'll work with. I think if the player fires a weapon and/or takes damage, then that's a pretty good sign they are being targeted. I will change it to a timed event to keep it even more simple.
PM

Login to post a reply

Server time is: 2024-04-25 09:14:24
Your offset time is: 2024-04-25 09:14:24