The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Script Help Newbie problems that are driving me crazy!
Vic7im Offline
Junior Member

Posts: 44
Threads: 9
Joined: Sep 2012
Reputation: 3
#1
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:
#1Big Grinisplay 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.
#5Sadmarginal) 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.


#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.

#4 and #5: No idea what to do, any help is appreciated Big Grin


Thanks in advance for the help, I really hope you'll enjoy the custom story I'm creating. Here's a screen [Image: 8xqwib.jpg]
(This post was last modified: 09-20-2012, 03:15 PM by Vic7im.)
09-20-2012, 03:11 PM
Find


Messages In This Thread
Newbie problems that are driving me crazy! - by Vic7im - 09-20-2012, 03:11 PM



Users browsing this thread: 4 Guest(s)