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.15 (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
Show message when you try to open a locked door?
cheztheguy Offline
Junior Member

Posts: 12
Threads: 7
Joined: Jun 2011
Reputation: 0
Show message when you try to open a locked door?

Hi, I'm working on my map again and I'm trying to make a message show on the screen when the player tries to open a door and it is locked.

Here's my whole script...
Spoiler below!

void OnStart()
GiveSanityDamage(25.0f, true);
AddEntityCollideCallback("Player", "False", "FalseChase", true, 0);

void FalseChase(string &in asParent, string &in asChild, int alState)
GiveSanityDamage(25.0f, true);
StartEffectFlash(1.0f, 1.0f, 1.0f);
AddTimer("FalseChaseTimer", 1.0f, "FalseChaseTimed");

void FalseChaseTimed(string &in asTimer)
SetEntityActive("servant_grunt_1", true);
StartPlayerLookAt("servant_grunt_1", 7, 50, "");
SetEnemyIsHallucination("servant_grunt_1", true);
AddTimer("FalseChaseEnd", 0.5f, "StopLookAtEnemy");

void StopLookAtEnemy(string &in asTimer)

void InteractClosedDoor(string &in asEntity)
AddTimer("Door", 0.5f, "DoorLockedMessage");

void DoorLockedMessage(string &in asTimer)
SetMessage("LockedDoor-Brute", "BruteDoorLocked", 7.0f);

Here is my whole extra_english.lang file...

Spoiler below!

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Good luck.</Entry>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_DungeonKeyOne">DungeonKey</Entry>
<Entry Name="ItemDesc_DungeonKeyOne">A key that leads to the dungeon below.</Entry>
<CATEGORY Name="Journal">
<Entry Name="Note_AlphaOne_Name">Operation Alpha I</Entry>
<Entry Name="Note_AlphaOne_Text">It seems that no one has found the purpose of the glowing rocks. They will lead us to our
doom.[br][br]The only way to get the Light is to pursue the Darkness.</Entry>
<CATEGORY Name ="Message">
<Entry Name="BruteDoorLocked">Firmly locked, looks like no human could open it.</Entry>

Is this correct? Because I try to open the door in the game and nothing shows up on screen.

In the Level Editor, when I click on the door to show the message when it's locked, here are the fields in the Entity tab...


CallbackFunc (blank)
ConnectedProps (blank)
ConnectionStateChangeCallback (blank)


PlayerLookAtCallback (blank)


PlayerInteractCallback "InteractClosedDoor"

OpenAmount - 0

(This post was last modified: 08-27-2011, 08:59 AM by cheztheguy.)
08-27-2011, 08:39 AM

Messages In This Thread
Show message when you try to open a locked door? - by cheztheguy - 08-27-2011, 08:39 AM

Users browsing this thread: 1 Guest(s)