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
Display text message until...
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#3
RE: Display text message until...

When the player interacts with the door (and he doesn't have the lantern) it will set the message; if the player has the lantern, the door will unlock and no longer display the message.

void OnStart()
{
SetEntityPlayerInteractCallback("NAME_OF_DOOR", "FUNC", false);
SetEntityPlayerInteractCallback("NAME_OF_LANTERN", "FUNC_2", false);
}

void FUNC(string &in asEntity)
{
if(HasItem("NAME_OF_LANTERN") == true)
{
SetMessage("NAME_OF_TEXT_CATEGORY", "NAME_OF_TEXT_ENTRY", 0);
}
}

void FUNC_2(string &in asEntity)
{
SetSwingDoorLocked("NAME_OF_DOOR", false, false); ///by having abEffects false, the player won't suddenly hear an unlocking noise
}

Hope that Helped!

I rate it 3 memes.
07-27-2012, 11:02 AM
Find


Messages In This Thread
Display text message until... - by iFondue - 07-27-2012, 10:46 AM
RE: Display text message until... - by Kreekakon - 07-27-2012, 10:58 AM
RE: Display text message until... - by Adny - 07-27-2012, 11:02 AM
RE: Display text message until... - by iFondue - 07-27-2012, 11:23 AM
RE: Display text message until... - by iFondue - 07-27-2012, 04:58 PM
RE: Display text message until... - by Kreekakon - 07-28-2012, 12:40 AM



Users browsing this thread: 1 Guest(s)