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
Some Questions - scripting
KonKaizo Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jan 2011
Reputation: 0
#1
Some Questions - scripting

Hey Guys,

I have some dumb questions. But, you know, people are dumb.
I have BAAAASIC JavaScript knowledge btw.
Here we go:

1. I dont get it. How do i create Journal entries? I followed the guide on the wiki but if i pick up the notice it just displays an empty letter.

My extra_english.lang looks like this:

<LANGUAGE>
    <CATEGORY Name="CustomStoryMain">
        <Entry Name="Description">Yuck!</Entry>
    </CATEGORY>
    
    <CATEGORY Name="Journal">
        <Entry Name="Note_Beginning_Name">BLA BLA</Entry>
        <Entry Name="Note_Beginning_Text">Bla Blah Blah Blah!</Entry>
</LANGUAGE>

and in the HPL editor i created a note_generic entity, and wrote "Beginning" into the NoteText field of the entity.
(also, i get no ingame Description, but that doesnt matter)

2. How can i display a text on the screen when the player looks on a specific point (like in the cistern)? I already messed around with the Sign Area, but i didnt manage it to work.

3. How do i create Mementos? ^^

There will be more questions soon^^ (i think)
KonKaizo
01-19-2011, 06:01 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#2
RE: Some Questions - scripting

1. You didn't close </CATEGORY> thing in the language file.
2. Every time player looks a place, you want to see same message, just place a "sign area" there, and open a category and write the entry.
3. You mean flashbacks?

01-19-2011, 06:45 PM
Website Find
KonKaizo Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jan 2011
Reputation: 0
#3
RE: Some Questions - scripting

(01-19-2011, 06:45 PM)Tanshaydar Wrote: 1. You didn't close </CATEGORY> thing in the language file.
2. Every time player looks a place, you want to see same message, just place a "sign area" there, and open a category and write the entry.
3. You mean flashbacks?

1. oh. :/ i must have been drunk when scripting this
2. Will test it.
3. No, i mean Mementos. Like: "The Key is locked. Go find a key.". Maybe its called otherwise in englsih, in german its "memento". (You can access to them with "M") Tongue
01-19-2011, 07:25 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#4
RE: Some Questions - scripting

Oh, sorry, it's me didn't understand.
I'm not good with objectives. I'm just a new noob for the tools.

I guess those are related to quest things, but better to check main game's files (map and/or hps files).

01-19-2011, 07:34 PM
Website Find
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#5
RE: Some Questions - scripting

2. An alternative to using a sign area would be to set a LookAt callback in the script, then have the called function use the SetMessage function.

3. For momentos, you'll need to use the AddQuest function for a trigger in your script, which will add a momento to the journal. Momentos in the .lang file go under the "Journal" category and will go off whatever entry you put in the script file.

Syntax: AddQuest(string& asName, string& asNameAndTextEntry);

asName - Name of the quest

asNameAndTextEntry - The Entry that will be used in the .lang file

e.g

In the script -
void AddCrowBarQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("crowbarquest", "CrowBarQuest");
}

In the .lang file -
    <CATEGORY Name="Journal">
    
    <Entry Name="Quest_CrowBarQuest_Text">The door's blocked by weak planks of wood. Maybe I can find something to pry them off?</Entry>

</CATEGORY>
01-20-2011, 03:57 AM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#6
RE: Some Questions - scripting

Thanks for the explanation!

01-20-2011, 12:37 PM
Website Find
KonKaizo Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jan 2011
Reputation: 0
#7
RE: Some Questions - scripting

Thank you!

Yet another Question.

I want that, if the player lits one of 2 specific lamps, he is forced too look somewhere and an entity (not a monster) activates. Additionally, a shocking sound should play, like in the storage room when the altar lamps get suddenly lit. Is this even possible? Thanks in advance^^
(This post was last modified: 01-22-2011, 01:04 PM by KonKaizo.)
01-22-2011, 12:45 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#8
RE: Some Questions - scripting

Possible, you can call back functions when player interacted with an entity. You can play sanity sounds in those functions. You can lit a lamp when a player looks somewhere. Many things are possible, but requires some trail & error.

01-23-2011, 01:01 PM
Website Find




Users browsing this thread: 1 Guest(s)