Since I am an amateur at scripting, or I should say I have no scripting abilities at all besides Void Onstart, Etc.
I made a post asking how to make the custom story show up, and I have that working. But right now I'm trying to give you, the player the ability to see directions on the screen when I walk in front of my door that is locked.
void CollidePlayerWithAreaHelp()
{
if(HasItem("cellar_key") == true)
{
SetMessage("This key will unlock the door.", 5);
}
else
{
SetMessage("GAH! Locked... I will need a key.", 5);
}
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
_______________________________________
As you can see I have everything above the OnStart or OnEnter (I was following the directions for scripting on the wiki). Near my locked door, or directly in front of it I have an area called AreaHelp, then near that area, I have a desk with a key inside of it with the name of (And yes the name that I gave it, not the actual name of the entity) cellar_key, but it's actually a key_study.
Does anyone see anything wrong with it? If someone could tell me how to take screenshots of my level editor on windows then please tell me (I've been too lazy to find out how), and if I have anything wrong please highlight them in bold, or just tell me.
Shall I simply copy the hps you put there and paste it into my .hps?
Thanks!
Lang file now (after edits):
______________________________________
<LANGUAGE>
<CATEGORY Name="Alone">
<Entry Name="Description">My part in history.</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_Test01_Name">History.</Entry>
<Entry Name="Note_Test01_Text">I cannot wait any longer to get started with my experiments, this will give me the chance to actually try it on a human other than some animals, but this was made for humans, and humans only. Once I find my way out of this room, history shall be written. -1832 Thomas Reifk.</Entry>
<Entry Name="Note_Test02_Name">Fear.</Entry>
<Entry Name="Note_Test02_Text">Tonight I heard something walking outside my study, I know it was no human as I had my servant leave and lock the door. I am almost certain that I saw a shadow as well, may the haunting of my earlier years be returning? If this is true then I must find my old friend, for he may be my only hope at stopping this... Thing at haunting anyone else.</Entry>
<Entry Name="Note_Test03_Name">Grant.</Entry>
<Entry Name="Note_Test03_Text">Hello Thomas, congradulations on your discovery of this new drug, this will be a great use to the world. This letter grants you $15,000 to continue research and imrpove this drug. Meanwhile we have three voulenteers that would like to help you with this research, they would like to have the drug tested on themselves.
LIST OF VOULENTEERS:
Davind Rindol-
-Tyler Ornent-
-Neille Caferik.</Entry>
</CATEGORY>
<CATEGORY Name="Messages">
<Entry Name="GAH">GAH! Locked... I will need a key. </Entry>
</CATEGORY>
</LANGUAGE>
_______________
There are four spaces before <Entry Name="GAH">GAH! Locked... I will need a key. </Entry>
(This post was last modified: 01-22-2012, 04:45 PM by Xeronaile.)
Put this to your .lang, I fixed the second message
<CATEGORY Name="Messages">
<Entry Name="GAH">GAH! Locked... I will need a key.</Entry>
<Entry Name="HasKey">This key will unlock the door.</Entry>
</CATEGORY>
I've fixed your .hps a couple of times. Make sure that you have the latest fix
<CATEGORY Name="Journal">
<Entry Name="Note_Test01_Name">History.</Entry>
<Entry Name="Note_Test01_Text">I cannot wait any longer to get started with my experiments, this will give me the chance to actually try it on a human other than some animals, but this was made for humans, and humans only. Once I find my way out of this room, history shall be written. -1832 Thomas Reifk.</Entry>
<Entry Name="Note_Test02_Name">Fear.</Entry>
<Entry Name="Note_Test02_Text">Tonight I heard something walking outside my study, I know it was no human as I had my servant leave and lock the door. I am almost certain that I saw a shadow as well, may the haunting of my earlier years be returning? If this is true then I must find my old friend, for he may be my only hope at stopping this... Thing at haunting anyone else.</Entry>
<Entry Name="Note_Test03_Name">Grant.</Entry>
<Entry Name="Note_Test03_Text">Hello Thomas, congradulations on your discovery of this new drug, this will be a great use to the world. This letter grants you $15,000 to continue research and imrpove this drug. Meanwhile we have three voulenteers that would like to help you with this research, they would like to have the drug tested on themselves.
LIST OF VOULENTEERS:
Davind Rindol-
-Tyler Ornent-
-Neille Caferik.</Entry>
</CATEGORY>
<CATEGORY Name="Messages">
<Entry Name="GAH">GAH! Locked... I will need a key.</Entry>
<Entry Name="HasKey">This key will unlock the door.</Entry>
</CATEGORY>
</LANGUAGE>
(01-22-2012, 04:42 PM)Unearthlybrutal Wrote: You can copy the .hps
Put this to your .lang, I fixed the second message
GAH! Locked... I will need a key.
This key will unlock the door.
I've fixed your .hps a couple of times. Make sure that you have the latest fix
The map loads but the messages will nto show up.
If this is important... Is there a script to apply a key to open a certain door?
(This post was last modified: 01-22-2012, 05:07 PM by Xeronaile.)