(09-25-2012, 04:10 PM)Akos115 Wrote: No error message. There is no text displayed when looking at the entity.
I had the same issue not long ago. The problem is either:
#1 .lang file error (even if you triple-check it, you may have overlooked it)
Fix: Create another entity with a text in it and see if it appears. If it doesn't then there's an error in the .lang file.
#2 Bad scripting.
I personally use on start stuff:
{
SetEntityPlayerLookAtCallback("Entity", "Function", true);
}
void Function (string &in asEntity, int alState)
{
if (alState == 1)
{
SetMessage("Category", "Text", 0);
}
}
which is basically the same thing you wrote.
If the second solution doesn't work there's an error in the .lang file, no way around that.