if you let me know what you are trying to do then i can help you more, these scripts probably wont work with the new version of reloaded and stock characters cant be hidden unless you remove the standard AI script.
save the following as spawn.lua and then place a start marker and an enemy character a bit infront, set the enemy to "spawn at start = no" and set the "main" script field to this spawn.lua and run - the enemy should only appear once u reach his location (note he will not do anything once he appears).
function spawn_init(e)
end
function spawn_main(e)
PlayerDX = g_Entity[e]['x'] - g_PlayerPosX; PlayerDY = g_Entity[e]['y'] - g_PlayerPosY; PlayerDZ = g_Entity[e]['z'] - g_PlayerPosZ;
PlayerDist = math.sqrt(math.abs(PlayerDX*PlayerDX)+math.abs(PlayerDY*PlayerDY)+math.abs(PlayerDZ*PlayerDZ));
if PlayerDist < 160 then
Spawn(e)
end
end
life's one big game
windows vista ultimate
i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11