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
Script Help (Request) Moving Shelf using Secrets Books
User01 Offline
Member

Posts: 97
Threads: 30
Joined: Feb 2013
Reputation: 0
#13
RE: (Request) Moving Shelf using Secrets Books

Sorry, have been busy lately. Now I'm back.

(05-07-2017, 02:03 PM)Mudbill Wrote: Well, I opened the map and saw that you didn't name your books correctly. They are named book_moveable_1 instead of book_1 as the script asks for.

I tested it and now it works just fine.
Oops, my bad.

Now I have trouble pulling the books back to the start position, when pulled the wrong book.

I added the AddPropForce (It's the only methode I can think of, correct me I'f I'm wrong) in a timer at the wrong book event.
PHP Code: (Select All)
void PullBook(string &in asParentstring &in asChildint alState) {
    if(
asParent == StringSub(asParent0asParent.length() - 1) + bookCounter) {
        
AddDebugMessage("Pulled the correct book. Number: " bookCounterfalse);
        
bookCounter++;
    } else {
        
AddDebugMessage("Pulled the wrong book. Number: " bookCounterfalse);
        
bookCounter 1;
        
AddTimer(""0.1f"resetbook");
    }

    if(
bookCounter 3) {
        
AddDebugMessage("Completed the puzzle!"false);
        
SetMoveObjectState("shelf_secret_door_1"1);
    }


void resetbook(string &in asTimer)
{
        
PlayGuiSound("wrong_book.ogg"1.0f);
        
AddPropForce("book_1"00, -180"world");
        
AddPropForce("book_2"00, -180"world");
        
AddPropForce("book_3"00180"world");

(This post was last modified: 05-14-2017, 10:23 AM by User01.)
05-14-2017, 10:21 AM
Find


Messages In This Thread
RE: (Request) Moving Shelf using Secrets Books - by User01 - 05-14-2017, 10:21 AM



Users browsing this thread: 2 Guest(s)