You are close.
If you know basic scripting then you should know that a .hps file should have
void OnEnter()
{
}
void OnLeave()
{
}
void OnStart()
{
}
What you need now is to place the first line in void OnStart() and then add the rest of the script like this:
EDIT: I just realized you haven't specified what entity you want to look at. The script line is:
SetEntityPlayerLookAtCallback("ENTITY", "CALLBACK", "false/true")
void OnStart()
{
SetEntityPlayerLookAtCallback("area_lookat_1", "LookAtFunction", true);
}
void LookAtFunction(string &in asEntity, int alState)
{
if(alState == 1)
{
SetEntityActive ("armour_nice_complete_4", true);
SetEntityActive ("armour_nice_complete_5", true);
SetEntityActive ("armour_nice_complete_6", true);
SetEntityActive ("armour_nice_complete_7", true);
SetEntityActive ("armour_nice_complete_8", true);
}
}
I added a little but to the script, so it works better. What i did was saying, if > only when the player crosshair goes into the area > call the script
(Not when it goes outside)
This can always be useful later on
Trying is the first step to success.