I've tried
wanderer.lua and masket soldier is doing odd things, like jumping while climb the stair.
@ Lee
wanderer.lua function is bad name as
ai_soldier instead of
ai_wanderer.
About the AIGetEntityHeardSound(AIObjNo) within
function module_combatcore.soundawareness(e,AIObjNo), I've done some adjust, so zombie react to the player shoots, I've test just shotgun, but you can add more sound as needed.
https://forum.game-guru.com/thread/217686
Anyway I think some extra command is needed, so you has not to add all tha sounds every time, something like you did with
playerDist.
A module loading all the gun sounds, and a command calling this module, to be use in custom functions (_init part)
function myfunc_init(e)
LoadGunSounds(e) -- all gun sounds loaded, instead of LoadGlobalSound ( "Files\\gamecore\\guns\\modern\\Shotgun\\fire1.wav", 1 ), a lot of times.
end
holding all these sound files inside array/table, for later use.
function module_combatcore.soundawareness(e,AIObjNo)
for i = 1,#GunSounds do
if AIGetEntityHeardSound(AIObjNo,GunSounds [i]) == 1 then
module_agro.alertallwithinradius(g_PlayerPosX,g_PlayerPosY,g_PlayerPosZ,750.0)
end
end
end
Or maybe each sound has to have some id , that allows me to identify the sound, as a gun sound (isGunSound). Just ideas.
3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz
OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4