05-04-2013, 01:04 PM
Hello, again!
It seems each time I do a new thing when it comes to scripting I have at least one problem. I'm a little new but I understand it. But I don't understand why my player won't look at the entity which is a bed!
HPS FILE:
(All other scripting has been removed)
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Dothing", true, 1);
}
void OnEnter()
{
}
void OnLeave()
{
}
void Dothing(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
StartPlayerLookAt("oxfordsbed", 1.0f, 1.0f, "");
SetMessage("Messages", "GetSomeSleep",3);
AddTimer("", 4, "Doelse");
}
void Doelse (string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
}
It seems each time I do a new thing when it comes to scripting I have at least one problem. I'm a little new but I understand it. But I don't understand why my player won't look at the entity which is a bed!
HPS FILE:
(All other scripting has been removed)
HPS Script
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Dothing", true, 1);
}
void OnEnter()
{
}
void OnLeave()
{
}
void Dothing(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
StartPlayerLookAt("oxfordsbed", 1.0f, 1.0f, "");
SetMessage("Messages", "GetSomeSleep",3);
AddTimer("", 4, "Doelse");
}
void Doelse (string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
}