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
Need help with scripts
NumsefisK Offline
Junior Member

Posts: 10
Threads: 1
Joined: Aug 2011
Reputation: 0
#11
RE: Need help with scripts

(08-17-2011, 09:52 PM)JetlinerX Wrote: Thats alright, I have done that a lot. Also, to fix your Extra Eng, use this:

<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">You wake up an unknown castle you must escape quickly before darkness will kill you!</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_diary_1_Name">Diary Entry 1</Entry>
<Entry Name="Note_diary_1_Text">I sometimes wake up in the middle of the night, because of the noises coming from the closet, but as I wake up, they suddenly disappear. I think I'm going to have to leave this place soon...</Entry>
</CATEGORY>
<CATEGORY>
<Entry Name ="Inventory"
<Entry Name="ItemName_Bedroom_Key">Bedroom Key</Entry>  
<Entry Name="ItemDesc_Bedroom_Key">The Key to the Bedroom</Entry>
</CATEGORY>
</LANGUAGE>

Let me know if that worked Wink

I'm sorry to inform you that it didn't work for me Sad
It still doesn't show me the name and text of the note & key, and the key doesn't work for the door. The monster doesn't spawn neither.
This is starting to get on my nerves.

I must've done something wrong in the .hps file.

08-17-2011, 10:00 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#12
RE: Need help with scripts

<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">You wake up an unknown castle you must escape quickly before darkness will kill you!</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_diary_1_Name">Diary Entry 1</Entry>
<Entry Name="Note_diary_1_Text">I sometimes wake up in the middle of the night, because of the noises coming from the closet, but as I wake up, they suddenly disappear. I think I'm going to have to leave this place soon...</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_Bedroom_Key">Bedroom Key</Entry>  
<Entry Name="ItemDesc_Bedroom_Key">The Key to the Bedroom</Entry>
</CATEGORY>
</LANGUAGE>

Try this instead.
08-17-2011, 10:08 PM
Find
NumsefisK Offline
Junior Member

Posts: 10
Threads: 1
Joined: Aug 2011
Reputation: 0
#13
RE: Need help with scripts

I think I found one of the problems with my note. It stayed as note_generic_1 but when i changed it to note_diary_1 (and i made sure it WAS note_diary_1) it still doesn't work.

I'm getting mighty tired of this.
08-17-2011, 10:20 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#14
RE: Need help with scripts

Oh, what you might be doing is not naming it correctly. In the level editor, select your note, and on the right hand of the screen, select the Entity tab. At the bottom, there will be a box labelled "NoteText"
That is what the .lang file uses as reference.
08-17-2011, 11:06 PM
Find
NumsefisK Offline
Junior Member

Posts: 10
Threads: 1
Joined: Aug 2011
Reputation: 0
#15
RE: Need help with scripts

Oh, i see now. Cheers, I'll have a look at it tomorrow.

Still don't understand why that bloody key won't work.
08-17-2011, 11:31 PM
Find
NumsefisK Offline
Junior Member

Posts: 10
Threads: 1
Joined: Aug 2011
Reputation: 0
#16
RE: Need help with scripts

[Image: fzc96d.png]

[Image: sy4h7p.png]

[Image: a8emu.png]

[Image: mwy4a1.jpg]

Is this correct settings?
08-18-2011, 04:11 PM
Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#17
RE: Need help with scripts

you can't use a space for the Bedroom Key TypeName. you need to use an underscore, because that's how you have it written in the lang file (you can't use spaces anyways). the writing in the lang file and in the TypeName must be exactly the same, I normally just copy and paste.

08-18-2011, 04:21 PM
Find
NumsefisK Offline
Junior Member

Posts: 10
Threads: 1
Joined: Aug 2011
Reputation: 0
#18
RE: Need help with scripts

I have now spent countless of hours trying to make my stuff work. I've renamed everything and redone my .hps and .lang file and still it doesn't work.

This is my .lang file
Quote:<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">You wake up an unknown castle you must escape quickly before darkness will kill you!</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Note_diaryone_Name">Diary Entry 1</Entry>
<Entry Name="Note_diaryone_Text">I sometimes wake up in the middle of the night, because of the noises coming from the closet, but as I wake up, they suddenly disappear. I think I'm going to have to leave this place soon...</Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemName_bedroomkey">Bedroom Key</Entry>
<Entry Name="ItemDesc_bedroomkey">The Key to the Bedroom</Entry>
</CATEGORY>
</LANGUAGE>

And this is my .hps file.
Quote:////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "bedroomkey", "bedroomdoor", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("bedroomdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "bedroomdoor", 0, false);
RemoveItem("bedroomkey");
}

///////////////////////////////////
//Run when entering map
void OnEnter()
{

}


////////////////////////////
// Run when leaving map
void OnLeave()
{

}

I haven't included the monster spawning script in here yet.

If its not going to work with your help, I'm gonna give modding a rest.
08-18-2011, 05:57 PM
Find




Users browsing this thread: 1 Guest(s)