(06-13-2012, 09:51 PM)GrAVit Wrote: [ -> ] (06-13-2012, 09:47 PM)pdkgaming Wrote: [ -> ] (06-13-2012, 09:46 PM)GrAVit Wrote: [ -> ] (06-13-2012, 09:33 PM)pdkgaming Wrote: [ -> ] (06-13-2012, 09:31 PM)GrAVit Wrote: [ -> ]I'm not sure if timers work well with what happens when Player looks at entity.
owh.. but how can I make my player to look at 3 entities with 1 second between them? (or more seconds..)
Yes.
uhh.... what? I asked how I could do it differentlyy :p
Sorry, misread. You make the function that activates after the player stares at the entity something different than a timer. Then you add "AddTimer" in the function, and in the timer that will be added, you put the code which was in the initial timer. Please note that I do not guarantee this will work, but it is the best I can give you.
okay.. trying to figure the stuff out.. Takes a lot of complicated thinking haha, but I'll let you know how it works after I'm done
okay... I think I just messed it up... Still a beginner haha :p So that's alright..
Im giving you my whole script once again.. im getting tons of errors:
main (43, 1) : INFO : Compiling void Function_corpse(string&in)
main (45, 2) : ERR : No matching signatures to "SetEntityPlayerLookAtCallback(string@&, string @&, const uint)"
main (45, 2) : INFO : Candidates are:
main (45, 2) : INFO : void SetEntityPlayerLookAtCallback(string&in, string&in, bool)
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "playsound", true, 1);
AddUseItemCallback("StudyKey", "studykey_1", "mansion_2", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_2", "EnemyAppear", true, 1);
AddEntityCollideCallback("servant_grunt_2", "ScriptArea_3", "EnemyDisable", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "Look_at_corpse", true, 1);
}
void playsound(string &in asParent, string &in asChild, int alState)
{
PlayMusic("break_wood1.ogg", false, 1, 0, 1.0, false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("unlock_door.snt", "unlock_door", "mansion_2", 0.0f, false);
RemoveItem("studykey_1");
}
void EnemyAppear(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_1", 1, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_2", 2, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_2", 2, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_3", 2, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 2, "");
}
void EnemyDisable(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("servant_grunt_1", false);
}
void Look_at_corpse(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("corpse_male_torso_1", 100, 100, "Function_corpse");
}
void Function_corpse(string &in asEntity)
{
SetEntityPlayerLookAtCallback("Look", "Timer_Next_1", 1);
}
void Timer_Next_1(string &in asTimer)
{
AddTimer("LookNext", 1, "Function_chest");
}
void Function_chest(string &in asEntity)
{
StartPlayerLookAt("chest_of_drawers_nice_broken_1", 100, 100, "Timer_Next_2");
}
void Timer_Next_2(string &in asTimer)
{
AddTimer("LookNext2", 1, "Function_painting");
}
void Function_painting(string &in asEntity)
{
StartPlayerLookAt("painting03_1", 100, 100, "Timer_Next_3");
}
void OnLeave()
{
}
And again.. sorry for leaving such long posts... I feel like a jerk whaha..
Anyways... HELP! XD