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
How to make Subtitles?
FreshKorruption Offline
Member

Posts: 94
Threads: 27
Joined: Oct 2011
Reputation: 1
#1
How to make Subtitles?

Does anybody know the exact scripting so that when you get to an area in your custom map, it says Press F to use your lantern.

Huh

Custom Stories

-BrastaSauce

10-15-2011, 06:45 PM
Website Find
schmupper Offline
Junior Member

Posts: 23
Threads: 1
Joined: Aug 2011
Reputation: 2
#2
RE: How to make Subtitles?

I could Give you a hint, but nah...

''Oh. My. God. He's DEAD. Quickly, if he hasnt started to smell, give him the kiss of life!''

Clarence - The monkey hater
10-15-2011, 06:57 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#3
RE: How to make Subtitles?

(10-15-2011, 06:57 PM)schmupper Wrote: I could Give you a hint, but nah...


That reply was a win. =P If you don't understand it, the comment is:

void GiveHint (string& asName, string& asMessageCat, string& asMessageEntry, float afTimeShown);
Displays a hint on the player's screen.
asName - the internal name
asMessageCat - the category in the .lang file
asMessageEntry - the entry in the .lang file
afTimeShown - time in seconds until the message disappears. If time is ⇐ 0 then the life time is calculated based on string length.

(This post was last modified: 10-15-2011, 07:27 PM by Statyk.)
10-15-2011, 07:27 PM
Find
FreshKorruption Offline
Member

Posts: 94
Threads: 27
Joined: Oct 2011
Reputation: 1
#4
RE: How to make Subtitles?

I don't understand some of this. In my hps file do i just put it anywhere and do i include void. And I don't know the category name of it or the entry. And where is the spot where i put in the name of my area.

Custom Stories

-BrastaSauce

10-15-2011, 09:18 PM
Website Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#5
RE: How to make Subtitles?

So you want it where you walk into a certain area and says Press F for Latern, Something like this
{
AddEntityCollideCallback("Player" "ScriptAreaName", "MyFunc", true, 1);
}

void MyFunc(string &in asParent, string &in asChild, int alState)
{
GiveHint ("LanternHint", "Hint", "LanternHint", 5);
}

*Note that you will need to change some names because your extra english.lang file maybe different.


Current Project
Forgotten
10-15-2011, 09:26 PM
Find
FreshKorruption Offline
Member

Posts: 94
Threads: 27
Joined: Oct 2011
Reputation: 1
#6
RE: How to make Subtitles?

I can't get it working. Please tell me what im doing wrong. Here is my extra_english.lang and .hps file.


Attached Files
.txt   extra_english.txt (Size: 1.73 KB / Downloads: 84)
.txt   hps file.txt (Size: 1,022 bytes / Downloads: 83)

Custom Stories

-BrastaSauce

10-15-2011, 09:50 PM
Website Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#7
RE: How to make Subtitles?

try using these (just copy and paste them and replace them, I just removed the unneeded spaces and such)

<LANGUAGE>
    <CATEGORY Name="CustomStoryMain">
        <Entry Name="Description">Survive the mansion, while revealing your fogotten past...</Entry>
    </CATEGORY>
    <CATEGORY Name="Journal">
        <Entry Name="Note_LetterOne_Name">Uncle's First Note</Entry>
        <Entry Name="Note_LetterOne_Text">Dustin,[br] You must hurry! A secret cult called "The Dark Descent" have sent out grunts to kill you off. I hadn't expected them to come for a few more months! They know you are alive! This probably all sounds confusing but just trust me. Do this for your parents. I will leave you more notes, but for now you have to get out of their. Grab what you can and go, and don't come back to this room!    [br]    -Uncle Daniel</Entry>
        <Entry Name="Note_LetterTwo_Name">Uncle's Second Note</Entry>
        <Entry Name="Note_LetterTwo_Text">Dustin,[br] I should tell you about your parents. First, they aren't dead. They are merely hiding, changed their names, their looks. They needed to hide from the evil that was overcoming our heritage. The "Dark Descent" mistook them for dead. They were part of a.....I hear them coming for me! If i survive i will tell you further more, but for now I have to go!    [br]    -Uncle Daniel</Entry>
    </CATEGORY>
    <CATEGORY Name="Inventory">
        <Entry Name="ItemName_GuestRoomKey">Guest Room Key</Entry>
        <Entry Name="ItemDesc_GuestRoomKey">Key to open the nearby door.</Entry>
        <Entry Name="ItemName_shinykey">Shiny Key</Entry>
        <Entry Name="ItemDesc_shinykey">A Shiny Key. Must go to the nearby door.</Entry>
    </CATEGORY>
    <CATEGORY Name="Levels">
        <Entry Name="leveldoor_1">Hallway</Entry>
    </CATEGORY>
    <CATEGORY Name="Hint">
        <Entry Name="LanternHint">Press F for Lantern</Entry>
    </CATEGORY>
</LANGUAGE>


////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "doorslam_1", "Collidedoorslam", true, 1);
AddUseItemCallback("", "shinykey", "mansion_3", "KeyOnDoor", true);
AddEntityCollideCallback("Player" "lanternhint", "Collidelanternhint", true, 1);
}

void Collidedoorslam(string &in asParent, string &in asChild, int alState)
{
    SetSwingDoorClosed("mansion_2", true, true);
    PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
    PlaySoundAtEntity("", "react_scare", "Player", 0, false);  PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
    GiveSanityDamage(5.0f, true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("mansion_3", false, true);
    PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
    RemoveItem("shinykey");
}

void Collidelanternhint(string &in asParent, string &in asChild, int alState)
{
    GiveHint ("LanternHint", "Hint", "LanternHint", 5);
}

-Grey Fox

Current Project
Forgotten
(This post was last modified: 10-15-2011, 11:44 PM by GreyFox.)
10-15-2011, 11:42 PM
Find




Users browsing this thread: 1 Guest(s)