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
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


Messages In This Thread
Can't make moving book to move through Impulse - by PutraenusAlivius - 09-26-2013, 09:15 AM



Users browsing this thread: 1 Guest(s)