• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Need Help Adding SFX when sea battle

I had no problems with changing the time scale, and it worked the way I wanted, but the whole operation was too risky for my tastes. I don't want to publish a mod that might break people's games in odd ways.

Eh? o_O

You're messing with the bell sound playback, not with TimeScale... The new variable is used for the bell play function.
 
POTC had no multiplayer (to my knowledge).
Your knowledge is correct.

Code:
float GetSeaTimeScale()
{
   //set your variable's new value
   return 3.0;
}
If I understand that use correctly, you don't need to make a whole function for it.
You could make it a #define or just use 'float GetSeaTimeScale = 3.0' .
 
If I understand that use correctly, you don't need to make a whole function for it.
You could make it a #define or just use 'float GetSeaTimeScale = 3.0' .

This is where it gets funny: I didn't create it! xD The original developers did. A whole function just to set a variable value. I guess they intended for the TimeScale to have different speed settings, but then scrapped the idea.
 
This is where it gets funny: I didn't create it! xD The original developers did. A whole function just to set a variable value. I guess they intended for the TimeScale to have different speed settings, but then scrapped the idea.
Ah, that explains a lot!
I indeed doubted a clever programmer like yourself would needlessly bring out the "big guns" like that.

Different timescale settings is something that was added to PotC:NH and eventually rewritten by me.
Originally it had one button for switching between 1x and 3x and a mod-added button for a 10x on top, so you could get up to 30x.

Now it's one button for "timescale up" and the other for "timescale down".
Because weird glitches started happening at 30x, the max limit is now 20x.

If you're interested, you can probably commandeer my code for the Sea Dogs games.
It is relatively simple stuff.
 
If you're interested, you can probably commandeer my code for the Sea Dogs games.
It is relatively simple stuff.

Thanks for the offer -- I'll keep it in mind. ^_^ We'll see if players will request it for CT. By default, CT has a 3x turbo speed, which seems to do well for the most part. It seems to me that 3x is about optimal to speed things up for when you're not on the worldmap. But then again, CT doesn't have DirectSail (yet)...
 
Sorry to disturb your research , i'm back :D

I would like to know how to stop my sound loop when i draw from an ennemy but i don't know where (or for what) put my "StopSound" function. Would you know where it would be ?
 
I would like to know how to stop my sound loop when i draw from an ennemy but i don't know where (or for what) put my "StopSound" function. Would you know where it would be ?

I take it you're talking about an enemy ship? Look for the "Ship_CheckMainCharacter" function in "Program/sea_ai/AIShip.c". You may have to add a conditional statement ("if" statement) that checks the distance between your ship and the enemy ship.

The correct usage for the "StopSound" function is:
Code:
StopSound("yoursoundID", 3000);
Where "3000" is 3 seconds of fade out time.
 
Back
Top