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
On-Screen messages
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#1
On-Screen messages

EDIT: Ok, im slightly tired so excuse me for being slightly informal Shy

Ok;
Basically, im trying to make a message appear on-screen when i enter an area script.
I imagine

GiveHint(string& asName, string& asMessageCat, string& asMessageEntry, float afTimeShown);
Or SetMessage, in which case, how what are the categories?

Or one of the 'Hint' Scripts would be the one to use, but the main problem is that im fairly new to XML Scripting, and thusly have no idea what the the bold parts mean - So, i suppose someone couldnt fill in a dud script which would display a message on screen upon entering an area, with insertmsghere or somesuch were a message would go?

Any aid is much appreciated
10-01-2010, 05:11 PM
Find
Placeable Offline
Junior Member

Posts: 21
Threads: 2
Joined: Sep 2010
Reputation: 0
#2
RE: On-Screen messages

I have not tried this myself but it would be something along the lines of the following:


First you create a category for the Hints in your extra_english.lang file, like this:

    <CATEGORY Name="Hints">
        <Entry Name="Hint_myHint_Text">

You can press buttons!!!

        </Entry>
    </CATEGORY>

Now I want to stress that I have no idea if the specific Category name or Entry name for Hints is as specified by the example above. It could be a reserved name for Hints or maybe you could put anything, I don't know.

Then with that line of code you posted it would look like this:

GiveHint("someHint", "Hints", "myHint", 5.0f);

That's how you do it with Journals, Quests, Items and other sort of message information.

Hope it helped.
10-01-2010, 05:30 PM
Find
SLi78 Offline
Junior Member

Posts: 23
Threads: 6
Joined: Sep 2010
Reputation: 0
#3
RE: On-Screen messages

(10-01-2010, 05:11 PM)Chilton Wrote: EDIT: Ok, im slightly tired so excuse me for being slightly informal Shy

Ok;
Basically, im trying to make a message appear on-screen when i enter an area script.
I imagine

GiveHint(string& asName, string& asMessageCat, string& asMessageEntry, float afTimeShown);
Or SetMessage, in which case, how what are the categories?

Or one of the 'Hint' Scripts would be the one to use, but the main problem is that im fairly new to XML Scripting, and thusly have no idea what the the bold parts mean - So, i suppose someone couldnt fill in a dud script which would display a message on screen upon entering an area, with insertmsghere or somesuch were a message would go?

Any aid is much appreciated

I think you should use the language tag to
<LANGUAGE>
  <RESOURCES>
  </RESOURCES>
<CATEGORY Name="CustomStoryMain">
    <Entry Name="Description">Just a brief description!</Entry>
    <Entry Name="WhatWasThat">What was that?</Entry>
</CATEGORY>
</LANGUAGE>

otherwise ther can be problems with the message.
10-01-2010, 05:37 PM
Find
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#4
RE: On-Screen messages

It seems the problem was my neglect of the language file - I presumed that category referred to some kind of message type - With some quick experimentation, i now have onscreen messages in the form of hints

Thankyou kindly
10-01-2010, 05:43 PM
Find
Placeable Offline
Junior Member

Posts: 21
Threads: 2
Joined: Sep 2010
Reputation: 0
#5
RE: On-Screen messages

Chilton can you tell us what names you used for the .lang file? For the category etc.

@SLi78 Yeah, I didn't put in the whole text of the .lang file. You would have to do what you posted of course.
10-01-2010, 08:39 PM
Find
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#6
RE: On-Screen messages

(10-01-2010, 08:39 PM)Placeable Wrote: Chilton can you tell us what names you used for the .lang file? For the category etc.

@SLi78 Yeah, I didn't put in the whole text of the .lang file. You would have to do what you posted of course.

<LANGUAGE>
<RESOURCES>
</RESOURCES>
There were a few other categories here i redacted
<CATEGORY Name="Hints"> //For every new hint, add a new Entry Name and Entry as seen in the initial hint below
<Entry Name="EntryHint"> //EntryHint is actually the name of the hint, and can be anything i like.
Redacted for censorship purposes, or more accurately, spoilers.
</Entry>
</CATEGORY> //Do not close the category before all desired hints have been added
</LANGUAGE>

Im not sure why you wanted that, but there you go
Also, i conservatively used the extra_english.lang to save a little space, and for ease of programming.

Also, spoilers noone would ever know was a spoiler out of a custom campaign for great glory... Or something
10-02-2010, 04:16 AM
Find
Placeable Offline
Junior Member

Posts: 21
Threads: 2
Joined: Sep 2010
Reputation: 0
#7
RE: On-Screen messages

Yeah, thank you. The reason I asked was because I thought you had to follow a strict rule of naming for the category and names. When it comes to item names and description you sort of have to do that to some extent.
10-02-2010, 10:17 AM
Find
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#8
RE: On-Screen messages

(10-02-2010, 10:17 AM)Placeable Wrote: Yeah, thank you. The reason I asked was because I thought you had to follow a strict rule of naming for the category and names. When it comes to item names and description you sort of have to do that to some extent.
As long as its just the name, and not part of the script, you can practically name it anything. I could have named the Category "Descent" for example, and so long as i referenced it correctly, it would have worked just as well, same with item names. However, this makes any organisation impossible, so naming things what they are is best
Its all in the details it seems
10-02-2010, 05:52 PM
Find
Placeable Offline
Junior Member

Posts: 21
Threads: 2
Joined: Sep 2010
Reputation: 0
#9
RE: On-Screen messages

True, yep. But with items you have to input the prefix 'ItemName_' & 'ItemDesc_' for the <entry> tags.
10-02-2010, 07:29 PM
Find
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#10
RE: On-Screen messages

(10-02-2010, 07:29 PM)Placeable Wrote: True, yep. But with items you have to input the prefix 'ItemName_' & 'ItemDesc_' for the <entry> tags.

Yes, but you can name the item itself whatever you like - The item name being the reference - As in, if i renamed the item in the editor, i would refer to it by its editor reference name rather than the name of the item itself
10-03-2010, 04:02 AM
Find




Users browsing this thread: 1 Guest(s)