i would have to guess that it would be the AI script destroying entity before this script could update the agro, does it work when not one shot kill?
and by the way you dont need
local getVar = Agro
that getVar was just my example of a local variable calling the value of a global if that makes sense, your script will still access the Agro global without anything having to call it first
example, script 2 could be as such:
function script2_init(e)
end
function script2_main(e)
-- The prompt uses the variable value from script 1 because it's global
Prompt("The varible number is" .. MyVariable .. "simple")
end
end
Edit:
I am far from a good coder here I just play around but one way around this would be possibly to get the entity number when you placed it in the editor (highlight it and it will display (e) number in bottom left corner) and use a separate script that checks to see if the entity has been destroyed or not (not even sure if that's possible).
I am hoping that smallg or someone who can Code could chime in here with a possible solution
PC Specs: Windows 7 home 64-bit, Amd 7900 3gb DDR5 graphics, 8gb DDR3 Ram, Intel i7 3.4ghz