Vic7im
Junior Member
Posts: 44
Threads: 9
Joined: Sep 2012
Reputation:
3
|
Newbie problems that are driving me crazy!
Afternoon everyone \o
I've stumbled into HPL editor last week when re-playing Amnesia and decided to give it a try.
I've been lurking the wiki and this forum and always found a solution to my problems with scripts.
But now, I can't find a solution to these.
Theorically, what I'd want to do is really simple:
#1 isplay a Hint or a Message when Interacting with a closed door
#2:Make entities DISappear
#3:Add Custom sounds
#4:Sounds have no fade range aka: they keep looping at full volume even if im far far away.
#5 marginal) Forceplayerlookat X variables
#1:
#2:
#3:
#4 and #5: No idea what to do, any help is appreciated
Thanks in advance for the help, I really hope you'll enjoy the custom story I'm creating. Here's a screen
(This post was last modified: 09-20-2012, 03:15 PM by Vic7im.)
|
|
09-20-2012, 03:11 PM |
|
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
|
09-20-2012, 04:18 PM |
|
Theforgot3n1
Member
Posts: 192
Threads: 20
Joined: Apr 2012
Reputation:
6
|
RE: Newbie problems that are driving me crazy!
I like the screenie! Looks good so far. Interesting little stand for the books. Looks slightly weird though.
Anyway.
Since I'm a lazy boy, I'll only answer some.
1.
void Locked(string &in asEntity)
{ if(GetLocalVarInt("MessageSet") != 1)
{
SetMessage("Messages", "Hint1", 4.0f);
SetLocalVarInt("MessageSet", 1);
}
}
You need to write "Locked" at the "Entity" tab (right to the general tab, with the name and all that) on the door you're interacting with, so that this script is played when the door is interacted with.
2.
If, say, you want a grunt to appear, you only need to write in the desired properties.
void AnyCallback(>words here depend on the event: is it a collide, look at, interact, etc?<)
{
SetEntityActive("Grunt",true); // This will activate a grunt with the simple name of "Grunt".
}
3.
Isn't it possible to just mimic an original amnesia snt.? Your name on the code you posted seems fucked up, if that could be the cause? (<font 9pt:normal/auto;;rgb(255, 0, 0);;inherit>laugh3.ogg</font> ???)
4.
Hm, not sure... are you sure the sound abruptly stops, when you move outta the circle?
5.
StartPlayerLookAt(string& asEntityName, float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback);
Fill in yo numbers.
Though I don't get the part "X variables".
|
|
09-20-2012, 05:26 PM |
|
Vic7im
Junior Member
Posts: 44
Threads: 9
Joined: Sep 2012
Reputation:
3
|
RE: Newbie problems that are driving me crazy!
Thanks for the replies, I've got most things working by now. Except
(09-20-2012, 05:26 PM)Theforgot3n1 Wrote: Hm, not sure... are you sure the sound abruptly stops, when you move outta the circle?
The problem is that the sound simply doesn't stop. For instance, the insanity ear ring, it should stop after a while, right? At least when opening it with media player, it stops after 4-5 seconds. In-game, it doesn't. I think I'll have to copy-paste it, edit it in the snt and use it as a custom sound.
About #1, I've found what my problem is, the .lang file. Nothing works. The file has the correct name, it's in the correct folder (I took it from another custom story and edited the parts I desidred, it has to be correct)
It's in E:/Amnesia/custom_stories/Mystory/, the name is extra_english.lang
I don't know what I should do. Everything I put in there doesn't show up in game. (Yes, names are checked and are correct)
Help? :<
|
|
09-21-2012, 03:20 PM |
|
Robby
Posting Freak
Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation:
47
|
RE: Newbie problems that are driving me crazy!
(09-21-2012, 03:20 PM)Vic7im Wrote: I've found what my problem is, the .lang file. Nothing works. The file has the correct name, it's in the correct folder (I took it from another custom story and edited the parts I desidred, it has to be correct)
It's in E:/Amnesia/custom_stories/Mystory/, the name is extra_english.lang
I don't know what I should do. Everything I put in there doesn't show up in game. (Yes, names are checked and are correct)
Help? :<
It won't show until you properly check for quotation marks and everything. There's a tiny mistake in there. Otherwise, post the lang file as an attachment. I'll fix that.
Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
(This post was last modified: 09-21-2012, 03:23 PM by Robby.)
|
|
09-21-2012, 03:22 PM |
|
Vic7im
Junior Member
Posts: 44
Threads: 9
Joined: Sep 2012
Reputation:
3
|
RE: Newbie problems that are driving me crazy!
(09-21-2012, 03:22 PM)Nemet Robert Wrote: It won't show until you properly check for quotation marks and everything. There's a tiny mistake in there. Otherwise, post the lang file as an attachment. I'll fix that.
Thanks, there was a "<zEntry> because I was typing fast
But again *sigh* Messages don't work.
Door name is Study, PlayerInteractCallback name is NoCrowbar
void OnStart()
{
SetEntityPlayerInteractCallback("NoCrowbar", "Hint1", true);
}
void Hint1 (string &in asEntity)
{
if(GetLocalVarInt("MessageSet") != 1)
{
SetMessage("Messages", "HintDoor", 4.0f);
SetLocalVarInt("MessageSet", 1);
}
}
///////////// Lang file ///////////////////
<CATEGORY NAME="Messages">
<Entry Name="HintDoor">Text here</Entry>
</CATEGORY>
The same door is opened by a Key, and that script works fine. It's this script I'm having trouble with. Any suggestions?
|
|
09-21-2012, 03:45 PM |
|
Robby
Posting Freak
Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation:
47
|
RE: Newbie problems that are driving me crazy!
I think the problem is here: (09-21-2012, 03:45 PM)Vic7im Wrote: if(GetLocalVarInt("MessageSet") != 1) Is that ! supposed to be there?
Also, the reason it may not work is because you are telling the game that IF LocalVarInt named "MessageSet" is 1, it should trigger that message.
But it looks like you want to set it to 1 after checking if the LocalVarInt is 1, which is technically not possible. That is what I get out of it. Try removing that "GetLocalVarInt" script function. If that fixes it, you're heading the right way.
Also, try "restarting" the map after each change (not quick map reload).
Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
(This post was last modified: 09-21-2012, 03:50 PM by Robby.)
|
|
09-21-2012, 03:50 PM |
|
Vic7im
Junior Member
Posts: 44
Threads: 9
Joined: Sep 2012
Reputation:
3
|
RE: Newbie problems that are driving me crazy!
(09-21-2012, 03:50 PM)Nemet Robert Wrote: I think the problem is here: (09-21-2012, 03:45 PM)Vic7im Wrote: if(GetLocalVarInt("MessageSet") != 1) Is that ! supposed to be there?
Also, the reason it may not work is because you are telling the game that IF LocalVarInt named "MessageSet" is 1, it should trigger that message.
But it looks like you want to set it to 1 after checking if the LocalVarInt is 1, which is technically not possible. That is what I get out of it. Try removing that "GetLocalVarInt" script function. If that fixes it, you're heading the right way.
I saw that on another script, the process is: if it isn't equal to 1, then display the message and set the value to 1 (so that if you do that again, it won't display the message because the value is set to 1) But, even if I remove that part the script won't work. I have no clue what's causing this. I'll place an "area" there with a collidecallback function, let's hope that works.
(This post was last modified: 09-21-2012, 05:46 PM by Vic7im.)
|
|
09-21-2012, 05:44 PM |
|
i3670
Posting Freak
Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation:
36
|
RE: Newbie problems that are driving me crazy!
This has nothing to do with the scripting, just something I reacted on. No door frame?
|
|
09-21-2012, 08:07 PM |
|
GoranGaming
Member
Posts: 183
Threads: 30
Joined: Feb 2012
Reputation:
7
|
RE: Newbie problems that are driving me crazy!
void OnStart()
{
SetPlayerInteractCallback("door", "InteractDoor", false);
}
void InteractDoor(string &in asEntity)
{
if(GetSwingDoorLocked== true)
{
SetMessage("Category", "Message", 0);
}
else
{
//Do nothing
}
}
Current projects:
The Dark Prison 85 % (Stopped working on this one)
Unnamed Project 7 %
|
|
09-21-2012, 08:46 PM |
|
|