06-26-2012, 11:37 PM
06-26-2012, 11:46 PM
void OnStart()
{
SetEntityConnectionStateChangeCallback("EntityName", "DesiredCallback");
}
void DesiredCallback(string &in asEntity, int alState)
{
if(alState == 1)
{
PlayMusic(Insert arguments here, because I don't know what you want.)
SetEntityInteractionDisabled(asEntity, true);
}
}
http://wiki.frictionalgames.com/hpl2/amn..._functions for script reference.
{
SetEntityConnectionStateChangeCallback("EntityName", "DesiredCallback");
}
void DesiredCallback(string &in asEntity, int alState)
{
if(alState == 1)
{
PlayMusic(Insert arguments here, because I don't know what you want.)
SetEntityInteractionDisabled(asEntity, true);
}
}
http://wiki.frictionalgames.com/hpl2/amn..._functions for script reference.
06-27-2012, 12:07 AM
(06-26-2012, 11:46 PM)Obliviator27 Wrote: [ -> ]void OnStart()ok this might be a little noobish but....
{
SetEntityConnectionStateChangeCallback("EntityName", "DesiredCallback");
}
void DesiredCallback(string &in asEntity, int alState)
{
if(alState == 1)
{
PlayMusic(Insert arguments here, because I don't know what you want.)
SetEntityInteractionDisabled(asEntity, true);
}
}
http://wiki.frictionalgames.com/hpl2/amn..._functions for script reference.
the song track is "myuu" and its .ogg
it keeps coming up myuu not declared? please help
06-27-2012, 01:18 AM
You're declaring it as a variable.
Whenever you see a parameter that requires a string value, make sure to encase it in quotation marks.
"myuu.ogg"
Whenever you see a parameter that requires a string value, make sure to encase it in quotation marks.
"myuu.ogg"
06-28-2012, 12:14 AM
(06-27-2012, 01:18 AM)Obliviator27 Wrote: [ -> ]You're declaring it as a variable.ok got it thanks
Whenever you see a parameter that requires a string value, make sure to encase it in quotation marks.
"myuu.ogg"
*brohoof*06-28-2012, 06:29 PM
It might be better to place a script entity at the phonograph and create a .snt file for the music, then tell the script to PlaySoundAtEntity and use the script area at the phonograph, that way it'll sound like the music is actually playing from the phonograph. Make sure you edit the .snt to use 3d effects, and change the sound radius to the size you want.
06-28-2012, 06:37 PM
(06-28-2012, 06:29 PM)Streetboat Wrote: [ -> ]It might be better to place a script entity at the phonograph and create a .snt file for the music, then tell the script to PlaySoundAtEntity and use the script area at the phonograph, that way it'll sound like the music is actually playing from the phonograph. Make sure you edit the .snt to use 3d effects, and change the sound radius to the size you want.can you do the basic script for me then please?

06-28-2012, 07:38 PM
No, because it requires just one line difference from what Obliviator posted. The main difference is that instead of using a simple .ogg file, you need to have a .snt file (what Amnesia uses to have all the parameters set up for various sound effects in-game), which is easily edited in a text program, and you need to place a script area where the phonograph is.
Also, you won't learn anything if you have other people do it for you. I told you exactly how to do everything, but I can't physically get into your computer and create the .snt file or the script area for you.
Also, you won't learn anything if you have other people do it for you. I told you exactly how to do everything, but I can't physically get into your computer and create the .snt file or the script area for you.