Frictional Games Forum (read-only)

Full Version: Level error!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I cant get text to work when interacting with objects, how is this done?

I put down this:

void Door1("castle_arched01_3")
{
[This door is locked, i wonder if there is a key to open it nearby.]
}
void Key1("StudyKey")
{
[I wonder if this is the key for the locked door.]
}



This was put down on a tutorial on the wiki. It doesnt work at all!
That. Is. Not how it WORKS!
How did you even get that!

*Ahem*
My apologies, ill actually be helpful now.

In the Level Editor, select the door, and go to its properties. You should see Text Category, and Text Entry.

Now, In the ExtraEnglish.lang, make a new category with a new entry, and input the message you want.

Now, in the editor, name this category and entry, and when you perform the action on the door (Depending on which entries you set) The message will be displayed.)

If that doesnt work, let me know and ill (Or someone will) put up a basic interact message script
Ok i found it on a apparent tutorial on the wiki. Obviously the person didnt explain too well... here is the tutorial page i think its near the bottom. http://hpl2.frictionalgames.com/tutorial...t_beginner


This is somethign i preveusly done but im not sure what i do for the message to appear when interactign with the locked door...

<CATEGORY Name="Inventory">
<Entry Name="ItemName_StudyKey">Study Key </Entry>
<Entry Name="ItemDesc_StudyKey">Key to open a locked door </Entry>
</CATEGORY>

So i guess its set out in the same manner but the entry name and category name will be different? But im not sure what to change it to (the itemName part and ItemDesc part), also where do i type the message? after the ItemName or ItemDesc ?

Thanks.
LoneWolf, at least check the tutorials and other custom stories before you go on here asking questions...

But anyhow, I guess it is still OK to ask some questions. Smile
(10-13-2010, 12:10 PM)Kyle Wrote: [ -> ]LoneWolf, at least check the tutorials and other custom stories before you go on here asking questions...

But anyhow, I guess it is still OK to ask some questions. Smile

I have checked but i dont understand most of the tutorials. Once i know hwo to do a certain script i just copy paste it when ever i need it and i will alter it to suit. Theres nothing wrong with asking questions, so why tell me off for it?

Also i have never scripted in my life and i already understand how to do quite a bit now with the help of the people on this forum. I know im makign alot of threads but i suppose my questions and answers recieved will help users in need.
I can make a brief video explaining this - I think.
Give me a minute.

EDIT: Or maybe i cant.

Ill try to give you a line of HPS then. That should work.
If you had a Skype account, i could just show you. But im not making any presumptions - Ill just try and draught a script for now.
HPS:

void OnStart()
{
MyFunc();
}

MyFunc("<<NAME OF DOOR HERE>>", "1")
{
GetSwingDoorLocked("<<NAME OF DOOR HERE>>");
if("GetSwingDoorLocked" == true);
SetMessage("DoorMessage","StudyDoor",6);
}

void OnEnter();
{
}

void OnLeave();
{
}

And in the Lang:


<CATEGORY Name="DoorMessage">
<Entry Name="ItemName_StudyDoor"> <<INSERT HERE>> </Entry>
<Entry Name="ItemDesc_StudyDoor"> <<INSERT HERE>> </Entry>
</CATEGORY>



That should work, unless ive completely misunderstood the Syntax Parameters, in which case its just a misplaced " or a missing line. That should however work. In theory :p
Thanks but the HPS file doesnt seem to work now. did you miss out a void ??

Error says that this part is the problem :

MyFunc("<<NAME OF DOOR HERE>>", "1") mine looks like this - MyFunc("castle_arched01_3", "1")

It states that the ( bracket is the problem.
Your right Smile

The ( isnt the problem, thats just syntax error.
Change
MyFunc("<<NAME OF DOOR HERE>>", "1")

to

void MyFunc("castle_arched01_3", "1")
Ok i did that but still get an error for that line.
Hm...
Im an idiot.

void MyFunc(string &in entity, int alState)

I forgot to actually USE a syntax.

If that doesnt work, im out of ideas
Pages: 1 2