Hey All,
Hope you're doing well.
I have a few scripting questions, with the first being of the highest priority. Also it goes without saying that I am not a programmer so please be patient with me.
Code: ags
If you have got this far and don't have the urge to facepalm or strangle me, congrats! Otherwise, I am deeply sorry.
Thanks in advance,
- Haff
Hope you're doing well.

I have a few scripting questions, with the first being of the highest priority. Also it goes without saying that I am not a programmer so please be patient with me.
- The first question relates to the LinkedAudio command in AGS 3.3
First the explanation:
What I'm hoping to do is assign a sound effect to a given View for footsteps. I'd like to have these sound effects operate similar to the SetRoomLocation command that exists for *AudioChannel functions.
In other words, I'd like the footsteps to be full volume when the player is closer to the foreground and quieter when they are in the distance.
How would I go about doing this?
Here is my script for a single View Frame:
ViewFrame *frame1 = Game.GetViewFrame(EGOWLKDAY, 0, 3);
frame1.LinkedAudio = aFS_Wood1;
- I'm obviously going to be working with a lot of View Loops for different perspectives.
Let's say I wanted to assign the same sound effect above (Loop 0, Frame 3), to all loops for the character, which in this case is Loop 0 to 7.
Is there an efficient way to code this, rather than copy pasting the code above and swapping the loop variables?
- Expanding on this further, if I wanted to have the sound effects for Frame 3 of All Loops trigger another sound at random so it is not always the same sound playing (let's call this aFS_Wood2 and/or aFS_Wood3), how would I adjust the code?
- And lastly, if everything above wasn't enough (what can I say? I'm a bum
), is it possible to use other *AudioChannel functions with the LinkedAudio command, such as .Panning and .Volume? If not, any suggestions for how to incorporate these would be greatly appreciated.
If you have got this far and don't have the urge to facepalm or strangle me, congrats! Otherwise, I am deeply sorry.
Thanks in advance,
- Haff