Frictional Games Forum (read-only)
Can't make moving book to move through Impulse - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Can't make moving book to move through Impulse (/thread-23389.html)



Can't make moving book to move through Impulse - PutraenusAlivius - 09-26-2013

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:
///---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.


RE: Can't make moving book to move through Impulse - Kreekakon - 09-26-2013

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:

Code:
SetPropObjectStuckState("Book", 1);