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
Can't make moving book to move through Impulse
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#1
Can't make moving book to move through Impulse

I have a problem. What I want is when a book is pulled (book_moveable at gameplay folder), another is pulled.

I tried making but the books aren't being pulled. I put a Debug at each section, and they do appear which makes me to believe it's the Impulse. I have no other options.

Spoiler below!

PHP Code: (Select All)
///---CALLBACKS---///
void OnStart()
{
    
AddEntityCollideCallback("MovingBook_1""MovingArea_1""TriggerBook"true1);
}
///---CALLBACKS---///

///---LAMPS SCRIPT---///
///---LAMPS SCRIPT---///

///---BOOK PUZZLE SCRIPT---///
void TriggerBook(string &in asParentstring &in asChildint alState)
{        
    
AddPropImpulse("MovingBook_1"600"world");
    
AddPropImpulse("MovingBook_4", -600"world");
    
AddEntityCollideCallback("MovingBook_4""MovingArea_4""FirstPull"true1);
    
AddTimer("StuckReverseFirst"0.0001f"UnStuckFirst");
    
AddDebugMessage("First trigger works"false);
}

void FirstPull(string &in asParentstring &in asChildint alState)
{
    
int First RandInt(23);
    switch(
First)
    {
        case 
2:
        
AddPropImpulse("MovingBook_2", -600"world");
        
AddEntityCollideCallback("MovingBook_2""MovingArea_2""SecondPull"true1);    
        
AddDebugMessage("Case Number Two Switch Statement works"false);
            break;
        case 
3:
        
AddPropImpulse("MovingBook_3", -600"world");
        
AddEntityCollideCallback("MovingBook_3""MovingArea_3""ThirdPull"true1);
        
AddDebugMessage("Case Number Three Switch Statement works"false);
            break;
    }
}

void SecondPull(string &in asParentstring &in asChildint alState)
{
    
AddEntityCollideCallback("MovingBook_3""MovingArea_3""FourthPull"true1);
    
AddDebugMessage("CASE NUMBER TWO WORKS"false);
}

void ThirdPull(string &in asParentstring &in asChildint alState)
{
    
AddEntityCollideCallback("MovingBook_2""MovingArea_2""FifthPull"true1);
    
AddDebugMessage("CASE NUMBER THREE WORKS"false);
}

void FourthPull(string &in asParentstring &in asChildint alState)
{
    
AddDebugMessage("CASE NUMBER TWO OUTCOME WORKS"false);
}

void FifthPull(string &in asParentstring &in asChildint alState)
{
    
AddDebugMessage("CASE NUMBER THREE OUTCOME WORKS"false);
}
///---BOOK PUZZLE SCRIPT---/// 


Any help is appreciated.

"Veni, vidi, vici."
"I came, I saw, I conquered."
09-26-2013, 09:15 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#2
RE: Can't make moving book to move through Impulse

I'm at work right now, and don't have access to my level editor to confirm this, but...

...the moveable books are the puzzle ones you can pull from the main story in the archives am I correct? If so, I don't think you can use propforce/impulse to affect them. Maybe try something like this instead:

SetPropObjectStuckState("Book", 1);

[Image: Tv0YgQb.gif]
Image by BandyGrass
(This post was last modified: 09-26-2013, 09:40 AM by Kreekakon.)
09-26-2013, 09:39 AM
Find




Users browsing this thread: 1 Guest(s)