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", true, 1);
}
///---CALLBACKS---///

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

///---BOOK PUZZLE SCRIPT---///
void TriggerBook(string &in asParent, string &in asChild, int alState)
{        
    
AddPropImpulse("MovingBook_1", 6, 0, 0, "world");
    
AddPropImpulse("MovingBook_4", -6, 0, 0, "world");
    
AddEntityCollideCallback("MovingBook_4", "MovingArea_4", "FirstPull", true, 1);
    
AddTimer("StuckReverseFirst", 0.0001f, "UnStuckFirst");
    
AddDebugMessage("First trigger works", false);
}

void FirstPull(string &in asParent, string &in asChild, int alState)
{
    
int First = RandInt(2, 3);
    switch(
First)
    {
        case 
2:
        
AddPropImpulse("MovingBook_2", -6, 0, 0, "world");
        
AddEntityCollideCallback("MovingBook_2", "MovingArea_2", "SecondPull", true, 1);    
        
AddDebugMessage("Case Number Two Switch Statement works", false);
            break;
        case 
3:
        
AddPropImpulse("MovingBook_3", -6, 0, 0, "world");
        
AddEntityCollideCallback("MovingBook_3", "MovingArea_3", "ThirdPull", true, 1);
        
AddDebugMessage("Case Number Three Switch Statement works", false);
            break;
    }
}

void SecondPull(string &in asParent, string &in asChild, int alState)
{
    
AddEntityCollideCallback("MovingBook_3", "MovingArea_3", "FourthPull", true, 1);
    
AddDebugMessage("CASE NUMBER TWO WORKS", false);
}

void ThirdPull(string &in asParent, string &in asChild, int alState)
{
    
AddEntityCollideCallback("MovingBook_2", "MovingArea_2", "FifthPull", true, 1);
    
AddDebugMessage("CASE NUMBER THREE WORKS", false);
}

void FourthPull(string &in asParent, string &in asChild, int alState)
{
    
AddDebugMessage("CASE NUMBER TWO OUTCOME WORKS", false);
}

void FifthPull(string &in asParent, string &in asChild, int 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)