MODULE: CharacterRegionSounds v0.80b - Fixed to work with AGS v2.72

Started by strazer, Fri 06/05/2005 00:43:16

Previous topic - Next topic

strazer

I originally wrote this to complement the CharacterControl script module so I thought I might as well post it here:

My CharacterRegionSounds script module for AGS v2.7 and up

This script module simplifies the process of giving ALL characters different footstep sounds for different surfaces like wood, concrete or grass.

Features:

* Different sounds on different regions for all characters
* Automatic volume scaling

It works very well in combination with the CharacterControl script module.
Any feedback appreciated.

Download v0.80b here
Mirror v0.80b (Thanks Candle!)

This download includes the script module and documentation.

strazer

#1
One feature missing that I'm going to implement soon is to also take into account the scaling of the character when calculating the volume, not only the distance to the player character.

Barbarian

#2
Hi Strazer. I meant to reply here sooner, and I wanted to test out your module a bit before replying as well. Then I got busy and sort of forgot,  :P but then reading a different thread elsewhere recently reminded me I should post some feedback here for you.

I've been using your wonderful CharacterRegionSounds module in my current game-in-production with good results.Ã,  After I got the hang of how to use the fairly simple to understand commands, it's now easy to control the characters footstep sounds just how I want according to what area (region) the character is walking over.

I haven't encountered any problems with this module yet, so overall I think you've done a great job on it.

Regarding your recent comment you mention about calculating the volume according to scaling, well as you are probably well aware now that CJ's recent versions of AGS (I think since 2.71 ?) now has that nice option built-in as a choice for the characters in the editor, so it looks like there no need for you to worry about that part anymore.

Thanks for sharing your great work with us.
Conan: "To crush your enemies, see them driven before you, and to hear the lamentation of the women!"
Mongol General: "That is good."

Blade of Rage: www.BladeOfRage.com

strazer

Thanks, I'm glad to hear it works for you!

As for the option in the editor, I think it only affects sounds linked directly to a view frame. But what this module does is check which frame is currently displayed, get the set sound number from its own "database" and play that, at a calculated volume (distance to player character). This allows you to have walking sounds in addition to any sounds you may want to link to the view frames. So using AGS's option probably won't do anything to the walking sounds. I'll have to check though, I haven't been scripting for a while.

Anyway, thanks again for your comments!

The_Creep

#4
Hey Strazer, I started a project in early 2006, and to various distractions, have not picked up on it since then. I had used your excellent module, which was working like a dream, thenÃ,  I upgraded to ags 2.72 and opened the file to continue work and all of a sudden I get an error that says:

There was an error compiling your script, the problem was in "CharacterRegionSounds".

[Error line 31] undefined symbol, "GetGameParameter"

Line 31 is    if ((loop < 0) || (loop >= GetGameParameter(GP_NUMLOOPS, view, 0, 0))) AbortGame("Invalid loop specified: '%d'. Use numbers 0 to %d.", loop, GetGameParameter(GP_NUMLOOPS, view, 0, 0) - 1)

can anyone tell me whats gone wrong? I know the new version of ags has moved my sounds to a folder, I'm just unsure how this has affected the code

Edit: Using the the BackwardsCompatible Module, I solved the initial problem, now the game compiles, but crashes before it can run, presenting me with the error:

Error: run_rep_Exec: error -6 (Error: Array index out of bounds (Index: 4, 0..3) in CharacterRegionSounds (line 56)
)Running Function "Repeatedly_Execute_Always"

Any help or insight would be greatly appreciated
If you had nothing left, would you risk it all to change everything?

strazer

Version 0.80b now up. I only fixed the module to work with AGS v2.72.

The_Creep, this solves the GetGameParameter error message.
The second error was caused due to a bug in the BackwardsCompatible module. But now you don't need that module anymore so all is well.

SMF spam blocked by CleanTalk