06-19-2015, 01:52 AM
So, can someone tell me, where is my mistake with this?
What it has to do is the following:
1. You enter an area (e.g script) and get a quest that you're tired.
2. You go in the area realy close to your bed.
3. You fadeout (go to sleep) and then fade in (wake up) with the first quest finished.
But for some reason, it only finishes the quest..
PHP Code:
void OnStart()
{
TeleportPlayer("PlayerStartArea_1");
AddEntityCollideCallback("Player", "Quest1", "Tired", true, 1);
AddEntityCollideCallback("Player", "Quest1Done", "TiredDone", true, 1);
;}
void Tired(string &in asParent, string &in asChild, int alState)
{
AddQuest("Tired", "Tired");
;}
void TiredDone(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("Tired", "Tired");
AddTimer("FadeOutTimer", float (0.1), "FadeOutFunc");
;}
void FadeOutFunc(string &in asTimer)
{
FadeOut(float (2));
AddTimer("FadeInTimer", float (0.1), "FadeInFunc");
;}
void FadeInFunc(string &in asTimer)
{
FadeIn(float (4));
;}
1. You enter an area (e.g script) and get a quest that you're tired.
2. You go in the area realy close to your bed.
3. You fadeout (go to sleep) and then fade in (wake up) with the first quest finished.
But for some reason, it only finishes the quest..