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:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I'm back, with a new custom story and another question! [SOLVED]
Karai16 Offline
Member

Posts: 164
Threads: 24
Joined: Apr 2011
Reputation: 0
#1
I'm back, with a new custom story and another question! [SOLVED]

Hey guys! I'm back after some time of not being here! ^^
I'm working on another custom story at the moment, but I'm facing some problems. You see:
void OnStart()
{
    SetEntityPlayerInteractCallback("OutsideDoor", "Checking", true);
    AddEntityCollideCallback("Player", "ScriptArea_1", "Checking2", true, 1);
}

void Checking(string &in asEntity)
{
    if (HasItem("Lantern")!=true)
    {
        SetMessage("Message", "OutsideDoorText", 0);
    }
}

void Checking2(string &in asParent , string &in asChild , int alState)
{
    if (HasItem("Lantern")==true)
    {
            SetLevelDoorLocked("OutsideDoor", false);
    }
}
This is the code of the Hallway. You can't go through a certain door as long as you don't have your lantern, which is in the bedroom. The lantern's called "Lantern". I've tested it, also with it just trying to play music instead of opening the door, but for some reason, it keeps saying that the second if statement is false, even if you have the lantern... can you help me out? I'm at a loss
Huh

Custom stories:
Her Games (100% Complete)
Her Games, All Bugs Fixed (100% Complete)
(This post was last modified: 07-27-2011, 04:16 PM by Karai16.)
07-25-2011, 05:08 PM
Find


Messages In This Thread
I'm back, with a new custom story and another question! [SOLVED] - by Karai16 - 07-25-2011, 05:08 PM



Users browsing this thread: 3 Guest(s)