Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Level error!
Author Message
LoneWolf Offline
Senior Member

Posts: 308
Joined: Sep 2010
Reputation: 0
Post: #1
Level error!

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!
10-12-2010 09:46 PM
Find all posts by this user Quote this message in a reply
Chilton Offline
Member

Posts: 138
Joined: Sep 2010
Reputation: 0
Post: #2
RE: Level error!

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
10-13-2010 02:56 AM
Find all posts by this user Quote this message in a reply
LoneWolf Offline
Senior Member

Posts: 308
Joined: Sep 2010
Reputation: 0
Post: #3
RE: Level error!

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.
10-13-2010 11:18 AM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 911
Joined: Sep 2010
Reputation: 7
Post: #4
RE: Level error!

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
Find all posts by this user Quote this message in a reply
LoneWolf Offline
Senior Member

Posts: 308
Joined: Sep 2010
Reputation: 0
Post: #5
RE: Level error!

(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.
10-13-2010 01:07 PM
Find all posts by this user Quote this message in a reply
Chilton Offline
Member

Posts: 138
Joined: Sep 2010
Reputation: 0
Post: #6
RE: Level error!

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 Tongue
(This post was last modified: 10-13-2010 01:24 PM by Chilton.)
10-13-2010 01:07 PM
Find all posts by this user Quote this message in a reply
LoneWolf Offline
Senior Member

Posts: 308
Joined: Sep 2010
Reputation: 0
Post: #7
RE: Level error!

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.
10-13-2010 05:03 PM
Find all posts by this user Quote this message in a reply
Chilton Offline
Member

Posts: 138
Joined: Sep 2010
Reputation: 0
Post: #8
RE: Level error!

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")
10-13-2010 05:16 PM
Find all posts by this user Quote this message in a reply
LoneWolf Offline
Senior Member

Posts: 308
Joined: Sep 2010
Reputation: 0
Post: #9
RE: Level error!

Ok i did that but still get an error for that line.
10-13-2010 05:25 PM
Find all posts by this user Quote this message in a reply
Chilton Offline
Member

Posts: 138
Joined: Sep 2010
Reputation: 0
Post: #10
RE: Level error!

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
10-13-2010 05:37 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)