The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
There has got to be an easier way to do this...
7heDubz Offline
Posting Freak

Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation: 41
#1
There has got to be an easier way to do this...

The script works fine, There just has to be an easier way to do this I just don't know how.

My scripting knowledge is mediocre at best while I know most of the words offhand I can't exactly implement them.

Anyone?

void OnStart(){}
void OnLeave(){}
void OnEnter(){
    SetEntityPlayerInteractCallback("book", "pages", true);
    AddUseItemCallback("", "key", "door", "unlock", true);
    SetSwingDoorLocked("door", true, false);
    PlayMusic("TemptingSecrets.ogg", true, .7f, .5f, 2, true);
    SetEntityActive("book_open_1", false);
}
void unlock(string &in asItem, string &in asEntity){
    SetSwingDoorLocked("door", false, true);
    PlayGuiSound("unlock_door.snt", 1.0f);
    PreloadParticleSystem("Paper_Blow_Fall.ps");
}
void pages(string &in asEntity){
    CreateParticleSystemAtEntity("particle", "Paper_Blow_Fall.ps", "particle_spawner", false);
    AddPlayerBodyForce(-20000, 0, 0, false);
    AddTimer("timer_1", 1.0f, "act_ent1");
    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 act_ent1(string &in asTimer){
    SetEntityActive("note_1", true);
    StartPlayerLookAt("note_1", 10, 10, "");
    AddTimer("timer_2", 1.0f, "act_ent2");
}
void act_ent2(string &in asTimer){
    SetEntityActive("note_2", true);
    StartPlayerLookAt("note_3", 5, 5, "");
    AddTimer("timer_3", 1.0f, "act_ent3");
    AddQuest("pickup", "pickup");
}
void act_ent3(string &in asTimer){
    SetEntityActive("note_3", true);
    AddTimer("timer_4", 1.0f, "act_ent4");
}
void act_ent4(string &in asTimer){
    SetEntityActive("note_4", true);
    StartPlayerLookAt("note_5", 5, 5, "");
    AddTimer("timer_5", 1.0f, "act_ent5");
}
void act_ent5(string &in asTimer){
        SetEntityActive("note_5", true);
        StartPlayerLookAt("note_6", 9, 9, "");
        AddTimer("timer_6", 1.0f, "act_ent6");
}
void act_ent6(string &in asTimer){
        SetEntityActive("note_6", true);
        AddTimer("timer_7", 1.0f, "act_ent7");
}
void act_ent7(string &in asTimer){
        SetEntityActive("note_7", true);
        StartPlayerLookAt("note_8", 7, 7, "");
        AddTimer("timer_8", 1.0f, "act_ent8");
}
void act_ent8(string &in asTimer){
    SetEntityActive("note_8", true);
        StartPlayerLookAt("note_1", 15, 15, "");
        StopPlayerLookAt();
}

So what happens is the player clicks on a book and all the pages fall out, One page after the other so the player gets some manner of idea as which to pic up first.

03-01-2014, 09:22 PM
Find


Messages In This Thread
There has got to be an easier way to do this... - by 7heDubz - 03-01-2014, 09:22 PM



Users browsing this thread: 1 Guest(s)