In a recent test, the soldier disappears completely, he is inside the house, I know because I has been there.
In a second test there is no problem.
Only if you change the values in properties as in the video.
latest 2017.03.10 live version, here.
edit: Anyway there is a workaround if you won't to touch the properties.
-- AI : Soldier Behavior
p_y = 0
ai_soldier_combatshoot = require "scriptbank\\ai\\module_combatshoot"
function ai_soldier_init(e)
if p_y == 0 then
p_x = GetEntityPositionX(e)
p_y = GetEntityPositionY(e)
p_z = GetEntityPositionZ(e)
end
ai_soldier_combatshoot.init(e,ai_combattype_regular)
end
function ai_soldier_main(e)
soldier_y(e)
-- Prompt(round(GetEntityPositionX(e)) .." - " ..round(GetEntityPositionY(e)) .." - " ..round(GetEntityPositionZ(e)) .." : " ..round(p_x) .." - " ..round(p_y) .." - " ..round(p_z))
ai_soldier_combatshoot.main(e,ai_combattype_regular,ai_movetype_usespeed,ai_attacktype_canfire)
end --main
function soldier_y(e)
if GetEntityPositionY(e) ~= p_y then
ResetPosition(e,p_x,p_y,p_z)
end
end
function round(num, idp)
local mult = 10^(idp or 0)
return math.floor(num * mult + 0.5) / mult
end
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