Well, the timers can be changed to this.
void pages(string &in asEntity){
CreateParticleSystemAtEntity("particle", "Paper_Blow_Fall.ps", "particle_spawner", false);
AddPlayerBodyForce(-20000, 0, 0, false);
AddTimer("timer_1", 1.0f, "timer");
AddTimer("timer_10", .5f, "timer");
}
void timer(string &in asTimer)
{
if(asTimer == "timer_1"){
SetEntityActive("note_1", true);
StartPlayerLookAt("note_1", 10, 10, "");
AddTimer("timer_2", 1.0f, "act_ent2");
}
else if(asTimer == "timer_10"){
SetEntityActive("fakebook", true);
AddPropForce("fakebook", -150, -30, 0, "world");
PlayGuiSound("book_paper_fall.ogg", 1.0f);
}
}
Or this:
void pages(string &in asEntity){
CreateParticleSystemAtEntity("particle", "Paper_Blow_Fall.ps", "particle_spawner", false);
AddPlayerBodyForce(-20000, 0, 0, false);
AddTimer("timer", 1.0f, "timer");
AddTimer("timer_10", .5f, "sound1");
}
void sound1(string &in asTimer)
{
SetEntityActive("fakebook", true);
AddPropForce("fakebook", -150, -30, 0, "world");
PlayGuiSound("book_paper_fall.ogg", 1.0f);
}
void timer(string &in asTimer)
{
string sEvent = asTimer;
float fEventSpeed = 1.0f;
bool bPauseAtStep = false;
AddLocalVarInt(asTimer, 1);
switch(GetLocalVarInt(sEvent))
{
case 1:
SetEntityActive("note_1", true);
StartPlayerLookAt("note_1", 10, 10, "");
fEventSpeed = 1.0f; //The time before starting the next case
break;
case 2:
SetEntityActive("note_2", true);
StartPlayerLookAt("note_3", 5, 5, "");
AddQuest("pickup", "pickup");
fEventSpeed = 1.0f;
break;
case 3:
//Just continue your timers here
break;
//Called when no more cases are found
default:
bPauseAtStep = true;
break;
}
if(!bPauseAtStep)
AddTimer(sEvent, fEventSpeed, sEvent);
}
Well, there are two here. Hopefully at least one of them well serve useful.