Frictional Games Forum (read-only)
Anyone need help? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Anyone need help? (/thread-7825.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


RE: Anyone need help? - Anxt - 05-10-2011

I think I found why it was messing up. I thought it was stuck in a loop because it wasn't calling the next part of the script, but I discovered that I placed a line that removed an essential timer in the wrong spot, causing the whole thing to mess up. The grunt is still not working QUITE like I want, but with some tweaking I should be able to get it right. I appreciate your assistance, and I promise I won't present you with any more headache-inducing issues Tongue


RE: Anyone need help? - Kyle - 05-10-2011

Thanks. It's alright, I just had a long day and I'm tired. :p


RE: Anyone need help? - Dominic0904 - 05-10-2011

Wait till I find another problem *rubs hands together in an evil manner*

Totally not milking this thread...Tongue


RE: Anyone need help? - Ge15t - 05-11-2011

Hey again kyle, I was just wondering how I could set the volume of a playsoundatentity? I need to make a the sound of a piano playing a bit louder so its actually noticeable. Thanks.


RE: Anyone need help? - Kyle - 05-11-2011

(05-11-2011, 10:28 PM)Ge15t Wrote: Hey again kyle, I was just wondering how I could set the volume of a playsoundatentity? I need to make a the sound of a piano playing a bit louder so its actually noticeable. Thanks.

I wish I knew too. The only solution I know is if you make the music quieter so the player can hear, and/or make the sound play closer to the player.


RE: Anyone need help? - Simpanra - 05-11-2011

(05-11-2011, 10:28 PM)Ge15t Wrote: Hey again kyle, I was just wondering how I could set the volume of a playsoundatentity? I need to make a the sound of a piano playing a bit louder so its actually noticeable. Thanks.

Maybe find the sound file you want to use (i assume its a .snt) and convert it into a .ogg, then use the PlayMusic function? ^_^

void PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);

the "float afVolume" variable is the volume of the music ^_^

I hope this helps =)


RE: Anyone need help? - Ge15t - 05-11-2011

Thanks Simp, but I figured out a way to get around the automatic fade in time for that particular sound, so it looks how it should! Thanks anyway for the reply!

I also have another question, i want a particular script area (lets call it area_1) to become 'active' when and only when I have picked up a certain object, or gone into a certain area.. As i have mentioned before, i am not too good with if statements, so some help would be greatly appreciated!


RE: Anyone need help? - Simpanra - 05-11-2011

(05-11-2011, 10:48 PM)Ge15t Wrote: Thanks Simp, but I figured out a way to get around the automatic fade in time for that particular sound, so it looks how it should! Thanks anyway for the reply!

I also have another question, i want a particular script area (lets call it area_1) to become 'active' when and only when I have picked up a certain object, or gone into a certain area.. As i have mentioned before, i am not too good with if statements, so some help would be greatly appreciated!

Thats not too difficult =)

If its when someone interacts with an object use; SetEntityPlayerInteractCallback (dont quote me on it but its something like that), or if you want the area to appear when the player enters a room, use an AddEntityCollideCallback =)


RE: Anyone need help? - Kyle - 05-11-2011

I'll help. It's as easy as pi! :p

Code:
void OnStart()
{
     AddEntityCollideCallback("Player", "area_1", "Function01", true, 1);
}
void Function01(string &in asParent, string &in asChild, int alState)
{
     AddEntityCollideCallback("Player", "area_2", "Function02", true, 1);
}
void Function02(string &in asParent, string &in asChild, int alState)
{
     [what ever you want to happen]
}

Please explain it a little better. You're confusing me. What exactly do you want to happen? Smile


RE: Anyone need help? - Ge15t - 05-11-2011

Oh wow that is easy! Also really simple, I cant believe I didnt think of that lol. Thanks heaps!

EDIT: In my map I have a door which leads to a dining room that is at the end of a hallway, after some playtesting I found that sometimes my flatmates would skip going into the little library area, thus missing out on a journal entry and some spooky footstep noises which took me AGES to get working. So therefore I made the door 'locked' and when you get close enough to the diary entry, it activates an area which blows the door open to the dining area!

So yeah, I got it working thanks!