Anxt
Senior Member
Posts: 588
Threads: 12
Joined: Mar 2011
Reputation:
10
|
RE: Anyone need help?
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
|
|
05-10-2011, 07:16 PM |
|
Kyle
Posting Freak
Posts: 911
Threads: 36
Joined: Sep 2010
Reputation:
7
|
RE: Anyone need help?
Thanks. It's alright, I just had a long day and I'm tired. :p
|
|
05-10-2011, 07:19 PM |
|
Dominic0904
Member
Posts: 63
Threads: 14
Joined: Apr 2011
Reputation:
0
|
RE: Anyone need help?
Wait till I find another problem *rubs hands together in an evil manner*
Totally not milking this thread...
|
|
05-10-2011, 07:56 PM |
|
Ge15t
Junior Member
Posts: 48
Threads: 8
Joined: Feb 2011
Reputation:
0
|
RE: Anyone need help?
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.
|
|
05-11-2011, 10:28 PM |
|
Kyle
Posting Freak
Posts: 911
Threads: 36
Joined: Sep 2010
Reputation:
7
|
RE: Anyone need help?
(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.
(This post was last modified: 05-11-2011, 10:36 PM by Kyle.)
|
|
05-11-2011, 10:36 PM |
|
Simpanra
Senior Member
Posts: 314
Threads: 28
Joined: Mar 2011
Reputation:
0
|
RE: Anyone need help?
(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 =)
|
|
05-11-2011, 10:42 PM |
|
Ge15t
Junior Member
Posts: 48
Threads: 8
Joined: Feb 2011
Reputation:
0
|
RE: Anyone need help?
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!
|
|
05-11-2011, 10:48 PM |
|
Simpanra
Senior Member
Posts: 314
Threads: 28
Joined: Mar 2011
Reputation:
0
|
RE: Anyone need help?
(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 =)
|
|
05-11-2011, 10:51 PM |
|
Kyle
Posting Freak
Posts: 911
Threads: 36
Joined: Sep 2010
Reputation:
7
|
RE: Anyone need help?
I'll help. It's as easy as pi! :p
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?
(This post was last modified: 05-11-2011, 10:54 PM by Kyle.)
|
|
05-11-2011, 10:53 PM |
|
Ge15t
Junior Member
Posts: 48
Threads: 8
Joined: Feb 2011
Reputation:
0
|
RE: Anyone need help?
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!
(This post was last modified: 05-11-2011, 11:08 PM by Ge15t.)
|
|
05-11-2011, 10:55 PM |
|
|