09-20-2012, 03:11 PM
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:
#1isplay 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.
#5marginal) Forceplayerlookat X variables
#1:
#2:
No clue how to do it. SetEntityActive with a false flag doesn't work
#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
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:
#1isplay 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.
#5marginal) Forceplayerlookat X variables
#1:
Spoiler below!
Assuming that my door is called "Door1" and has the PlayerInteractCallback named "Locked"
all I know is that you place this code in the hps file:
void Locked(string &in asEntity)
{ if(GetLocalVarInt("MessageSet") != 1)
{
SetMessage("Messages", "Hint1", 4.0f);
SetLocalVarInt("MessageSet", 1);
}
}
and this in the extra_english.lang file
< CATEGORY Name="Messages" >
< Entry Name=“Hint1” > A complex lock.[br]I'll have to find the right key.< /Entry >
< /CATEGORY >
I have no idea what to do. It should play just fine but it doesn't.
all I know is that you place this code in the hps file:
void Locked(string &in asEntity)
{ if(GetLocalVarInt("MessageSet") != 1)
{
SetMessage("Messages", "Hint1", 4.0f);
SetLocalVarInt("MessageSet", 1);
}
}
and this in the extra_english.lang file
< CATEGORY Name="Messages" >
< Entry Name=“Hint1” > A complex lock.[br]I'll have to find the right key.< /Entry >
< /CATEGORY >
I have no idea what to do. It should play just fine but it doesn't.
#2:
Spoiler below!
No clue how to do it. SetEntityActive with a false flag doesn't work
#3:
Spoiler below!
I've followed the guide for custom sounds but they simply won't work. All I've done is to create a new folder named sounds within my custom story folder, then place the .ogg files, then open up a txt editor and write
< SOUNDENTITY >
< SOUNDS >
< Main >
< Sound File="<font 9pt:normal/auto;;rgb(255, 0, 0);;inherit>laugh3.ogg</font> " />
< /Main >
< /SOUNDS >
< PROPERTIES Volume="5" MinDistance="1" MaxDistance="50" Random="0" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="false" Blockable="False" BlockVolumeMul="0.7" Priority="5" />
< /SOUNDENTITY >
I've put some spaces because for some reason the forum won't copy-paste my code correctly.
Obviously replacing the "sound.ogg" with the one I want.
Then just use the HPL editor to associate that sound with an event, but that doesn't work.
< SOUNDENTITY >
< SOUNDS >
< Main >
< Sound File="<font 9pt:normal/auto;;rgb(255, 0, 0);;inherit>laugh3.ogg</font> " />
< /Main >
< /SOUNDS >
< PROPERTIES Volume="5" MinDistance="1" MaxDistance="50" Random="0" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="false" Blockable="False" BlockVolumeMul="0.7" Priority="5" />
< /SOUNDENTITY >
I've put some spaces because for some reason the forum won't copy-paste my code correctly.
Obviously replacing the "sound.ogg" with the one I want.
Then just use the HPL editor to associate that sound with an event, but that doesn't work.
#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