11-13-2012, 04:44 PM
i want to set an entity active, when the player looks at an area. i saw this http://www.frictionalgames.com/forum/thread-18368.html
but i didnt understand it. i always get fatal error.
my code now:
SetEntityPlayerLookAtCallback("area_lookat_1", true, 1);
void area_lookat_1(string &in asEntity, int alState)
{
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);
}
but i didnt understand it. i always get fatal error.
my code now:
SetEntityPlayerLookAtCallback("area_lookat_1", true, 1);
void area_lookat_1(string &in asEntity, int alState)
{
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);
}