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
SOLVED: Script based on the Orb Pillars not working...
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#5
RE: Script based on the Orb Pillars not working...

The undeclared error was probably caused by you missing the very top line.

Perhaps your areas are too close to where the pillars are when lying down. Remember that they need to cover the pillars as they stand, but let the pillars completely exit the area when fallen.

You can then test to see if it runs correctly by putting either debug messages (if you use dev env) or just SetMessage or similar into the code. I prefer using debug messages because you can check variables with them.

Something like this:

PHP Code: (Select All)
void PillarExit(string &in asParentstring &in asChildint alState) {
    
AddDebugMessage("Calling PillarExit"false);
    if(
alState != -1) return; //This isn't exactly necessary since it's only called upon exit.

    
pillarsKnocked++; //This adds 1 to the variable, counting total pillars knocked.
    
AddDebugMessage("pillarsKnocked = " pillarsKnockedfalse);

    if(
pillarsKnocked 4) return; //Unless knocked pillars have reached 4, no further code is ran.

    
AddDebugMessage("Complete!"false);
    
//Run your code here that you want to be called upon knocking all 4 pillars over.


Check here if you need to enable development environment:
https://wiki.frictionalgames.com/hpl2/am...evenvguide

Use F1 in-game and enable debug messages in the tools.

(This post was last modified: 04-30-2016, 12:12 PM by Mudbill.)
04-30-2016, 12:08 PM
Find


Messages In This Thread
RE: Script based on the Orb Pillars not working... - by Mudbill - 04-30-2016, 12:08 PM



Users browsing this thread: 1 Guest(s)