Sound volume & Entity Type Obstacle vs NPC

machok

Well-known member
I have 2 question here,
first how to raise the sound volume more than 15? because I need it to sound louder
51268197539_3285321e69_z.jpg



2nd, why is it so difficult to make fall/death animations on obstacle types? if I change the type to npc, the animation will be longer and better (at least close to what I want)
I'm attaching a video to show it
first dan 3rd drum are Npc type, second and fourth drum are obstacle type

i can just leave the drum on npc type but in this type there are things that get quite annoying, like icondie doesn't disappear quickly
and under certain circumstances enemies will behave strangely because they feel npc types around other than players
any advice or tips will be very helpful, thanks
 
Solution
machok

and for the sound volume, it turned out to be more complicated than I thought
Here's an example of how play the same sound twice without change the volume in the sound file. You can set a very small delay like 1 and it will simulate a doubled volume.

Code:
anim guardbreak
	loop	0
	delay	1
	offset	62 126
	bbox 	50 65 24 62
	sound	data/sounds/GuardBreak.wav
	frame	data/chars/heroes/axel/grabbed00.gif
	sound	data/sounds/GuardBreak.wav
	frame	data/chars/heroes/axel/grabbed01.gif
machok

about the sound , i have the opposite problem, i have noticed that openBOR (kratus build) makes the music volume go down & the sounds go up a bit, thus i want the opposite, for the sound to go down at certain parts in the game to emphasyze the music.

look around in the manual, right around where fademusic (or music fade) is, there are commands for lowering the volume of music & sounds, usually you need an entity to do it tho, so you can call the command in between frames

using enemy or npc on barrels brings you a bunch of problems...

when making randomized barrels i confronted the following:

when barrels are obstacles, if you hit them from the left , the death or fall animation flies to the right,
if you hit them from the right , the fall animation flies to the left. in a nutshell, the engine gives the object some "inertia"

On the other hand, making a barrel an npc or enemy will turn this "inertia" off
- you hit a barrel from the right, the animation will fall to the right,
- you hit it from the left , the animation will fall to the right too.
only counter to this is to use code & to manually add animation frames use flip commands, jumpframe, etc.
another problem is that if you make the barrels NPC's enemies will actively destroy them if they have the "damage NPC"ish commands activated,
again you can make use of Bloodbane  's factions scripts to make the barrels a faction or you can use stealth values to make the barrels invisible, in the end is just a lot of work for same-ish results.

One solution i can give you is this:
you can try & change the model of the barrel using script, the barrel can change to npc or enemy type at any frame of its fall animation, in this way you may be able to have a better animation for them at the last few seconds of its "life"
 
oldyz
I used the build 6330 for a long time, then I changed to the 6391 and after to the master source code but sincerely I didn't feel the difference.
The only change related to the sound I saw in the OpenBOR source code is about the "advanced" menu option (the one that changes frequency and bits), that was removed in 2019, but it's not related to the volume.

A few sound effects or music in SOR2X maybe changed the volume a little but I edited the media files directly, it's not related to the engine.

machok
About the sound, if you want a permanent solution maybe it's better to change the volume in the sound files directly.

If you do not want to change the files, there's a trick that you can use to increase the volume for a few moments. You can play the same sound twice or more at the same time, the volume multiplies.
You can check it in SOR2X at the SOR3 route stage1b, the Ash boat engine sound will increase gradually when it approaches and decrease gradually when the entity dies without changing anything in the engine volume.
 
oldyz said:
look around in the manual, right around where fademusic (or music fade) is, there are commands for lowering the volume of music & sounds, usually you need an entity to do it tho, so you can call the command in between frames
I thought at first there was an easy way to increase the volume in the main menu options because we can increase the music and sfx volume quite high there.. then why not with sound?
if I have to do it with a command-script then I will do it thanks

oldyz said:
using enemy or npc on barrels brings you a bunch of problems...
- you hit a barrel from the right, the animation will fall to the right,
- you hit it from the left , the animation will fall to the right too.
again you can make use of Bloodbane  's factions scripts to make the barrels a faction or you can use stealth values to make the barrels invisible, in the end is just a lot of work for same-ish results.
I don't have this direction animation problem but I haven't tried the stealth values so I might try it tonight

Kratus said:
About the sound, if you want a permanent solution maybe it's better to change the volume in the sound files directly.
I did but sounds still low in the game

Kratus said:
If you do not want to change the files, there's a trick that you can use to increase the volume for a few moments. You can play the same sound twice or more at the same time, the volume multiplies.
You can check it in SOR2X at the SOR3 route stage1b, the Ash boat engine sound will increase gradually when it approaches and decrease gradually when the entity dies without changing anything in the engine volume.
thanks I’ll look into it
 
Kratus said:
oldyz
I used the build 6330 for a long time, then I changed to the 6391 and after to the master source code but sincerely I didn't feel the difference.
The only change related to the sound I saw in the OpenBOR source code is about the "advanced" menu option (the one that changes frequency and bits), that was removed in 2019, but it's not related to the volume.

A few sound effects or music in SOR2X maybe changed the volume a little but I edited the media files directly, it's not related to the engine.
.....

I don't know if the older version had this, but the one I use for nightslashers has that issue, it seems that the music is lowered by about 1 or 2 db when enemies are on the screen & their sounds are louder than the music, there could be other factors, maybe the televison is doing this, even tho i have messed around with its settings & turned off all equalization filters , i still perceive this change.
No biggie, since script can counter-act it if there is a need.

machok
in the manual i see this under openborvariant section:
"musicvol", - gets the music volume
"soundvol", - controls the sound (samples) volume

then further down:

playsample(id, priority, lvolume, rvolume, speed, loop)

    id: loaded sample
    priority: to play channels with lowest current priority first. default -1
    lvolume: left volume
    rvolume: right volume
    speed: sound speed (integer): from 0 to.. x
    loop: 1 or 0. 1 for loop sound

i think (may be wrong) that the use/combo of these & other scripts are what Damon uses for his "random" enemy sounds techniques, from what i recall/understand, he uses scripts to load a bunch of samples & 'binds" them to a particular animation & unloads one of them at random with playsample or a similar custom command - golden axe the hack job features this...
 
oldyz
I set stealth value to 2 and everything goes well in the first try, enemies now ignoring the drumcan thanks  :)
and for the sound volume, it turned out to be more complicated than I thought so for a temporary solution what I'm doing now is to edit the sound volume by 199% (because I only need 1 file to sound loud)
and now it sounds pretty loud in the game


**I'll still pay attention to these 2 things in the future but for now it's good enough for me and thank you for the help
 
O_Ilusionista said:
About the obstacle, see if this helps you http://www.chronocrash.com/forum/index.php?topic=3973.0
Yes I've tried your facing script a while ago (I post 29th april there)
but for some reason I canceled to use it and I forgot why

I'll try to recall what is the reason
 
machok

and for the sound volume, it turned out to be more complicated than I thought
Here's an example of how play the same sound twice without change the volume in the sound file. You can set a very small delay like 1 and it will simulate a doubled volume.

Code:
anim guardbreak
	loop	0
	delay	1
	offset	62 126
	bbox 	50 65 24 62
	sound	data/sounds/GuardBreak.wav
	frame	data/chars/heroes/axel/grabbed00.gif
	sound	data/sounds/GuardBreak.wav
	frame	data/chars/heroes/axel/grabbed01.gif
 
Solution
Kratus said:
Here's an example of how play the same sound twice without change the volume in the sound file. You can set a very small delay like 1 and it will simulate a doubled volume.

Kratus I multiplied by 4 times and now it sounds perfectly thank you  :)
think I can use this trick for other things

Code:
anim	idle
        flipframe 1
	offset	0 298
	movez	0
	drawmethod tintmode 0
	drawmethod tintcolor 0  0  0
	delay	1
	frame	data/Bgs/Subway/other/empty.gif
        sound     data/sounds/Moment_of_Joy.wav
	frame	data/Bgs/Subway/other/empty.gif
        sound     data/sounds/Moment_of_Joy.wav
	frame	data/Bgs/Subway/other/empty.gif
        sound     data/sounds/Moment_of_Joy.wav
	frame	data/Bgs/Subway/other/empty.gif
	movez	38
        sound     data/sounds/Moment_of_Joy.wav
	delay	10
	frame	data/Bgs/Subway/other/subway_3.gif
	frame	data/Bgs/Subway/other/subway_4.gif
 
Now I remember
I still have an obstacle (dustbin) with your facing script, so when players attacking the dustbin for a moment the player is like stuck when walking past it (about 1 second)
Not sure what it is because I certainly didn't write any platform settings except on idle animations
this happens when I put flip 1
Code:
spawn dustbin
flip 1
coords 139 206
at 0

Of course I don't need to put flip 1 but this still happens when there is an enemy who tries to destroy the dustbin from the opposite direction, this enemy also stuck for a moment when passing through it
 
Back
Top Bottom