Frictional Games Forum (read-only)

Full Version: names problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I can't get the finger on how to fix names for doors etc. Like when a door is locked, what's the code for that? and if you succesfully force opens a door, what's the code for that?. Like that kind of stuff :O. Any ideas?
I don't really understand what you're asking...Names or doors?
I believe he's asking about script functions.

Locked doors are set in the Level Editor, somewhere in the entity properties I think.

As for your other question, no idea on how to answer that.
you know some of the doors say "it wont budge" how to fix that?
(06-22-2011, 02:24 PM)xtron Wrote: [ -> ]you know some of the doors say "it wont budge" how to fix that?

That can't be fixed as it is a Script?
(06-22-2011, 02:24 PM)xtron Wrote: [ -> ]you know some of the doors say "it wont budge" how to fix that?

Spoiler below!
voidOnStart()
{
SetEntityPlayerInteractCallback("doorname", "name", true);
}

void name(string &in asEntity)
{
if(GetSwingDoorLocked("doorname")== true)
SetMessage("langcat", "nameofentry", 5.0f);
}

where to write the entry? *cute eyes*
(06-22-2011, 09:45 PM)xtron Wrote: [ -> ]where to write the entry? *cute eyes*

Spoiler below!
CATEGORY Name="langcat">
<Entry Name="nameofentry">It wont budge.</Entry>
</CATEGORY>


You can name the catergory whatever you want unlike with journals and things.
(06-22-2011, 09:45 PM)xtron Wrote: [ -> ]where to write the entry? *cute eyes*

You put the entry and the language category in the extra_english.lang file.

Example:

Spoiler below!

voidOnStart()
{
SetEntityPlayerInteractCallback("mansion_1", "Message", true);
//When the player interacts with the door "mansion_1", the function "Message" happens
}

void Message(string &in asEntity)
{
SetMessage("Doors", "mansion_1", 5.0f);
//The language category is "Doors" and the entry is "mansion_1"
}

in the extra_english file you write;

<CATEGORY Name="Doors">
<Entry Name="mansion_1">It won't budge.</Entry>
</CATEGORY>


Oh ok thanks Big Grin

Is it possible to make a repeat, if you interact with the door again the same text appears?.
Pages: 1 2