• 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!

Grenades, flamethrowers, poisondarts, whatever...

Looks logical to me, but maybe the variable name or type doesn't match. I have often problems like that, something looks right to me, but one variable is a string instead of an integer, or an object instead of an index.

FAIK something with ref in front, like rCannon, is an object , while CANNON_TYPE_CANNON_LBS12 might be an integer/index or a namestring. so maybe you can't compare them. What does the errorlog say?

But that you have already found that "playSound" command makes things easier. That looks in fact very much like the (hand)gunsound code, so one could copy the SWAK code as you initially suggested.

In cannonscannons_init insert into each cannontype definition a line with a soundfilename as attribute:

rCannon.sound = "filepathfilename.wav";

And in AIBalls change your code like this

ref rCannon = GetCannonByType(sti(aCharacter.Ship.Cannons.Type));
Play3DSound( rCannon.sound , fX, fY, fZ);

Just an untested idea though
 
<!--QuoteBegin-alan_smithee+--><div class='quotetop'>QUOTE(alan_smithee)</div><div class='quotemain'><!--QuoteEBegin-->Aye, same here: key 4 works, but not the others. OR else after trying the other keys I get all the string log messages upon leaving the location and entering a new one. Once it even cycled through my ammo types as soon as I boarded my ship at port.

(Was the firedrill included in this release, by the way? I never got around to putting that code in.)

And I wish I knew what disables the F2 menu... that's a `pet-peeve` of mine.<!--QuoteEnd--></div><!--QuoteEEnd-->

The controls problem seems to be fixed:

Since Build 12 all controls have been assigned to a group in controlsinit_pc
Before B12:

CI_CreateAndSetControls( "", "BI_ChargeCannonballs", CI_GetKeyCode("KEY_1"), 0, false );


Since B12:

CI_CreateAndSetControls( "Sailing3Pers", "BI_ChargeCannonballs", CI_GetKeyCode("KEY_1"), 0, true );
MapControlToGroup("BI_ChargeCannonballs","Sailing1Pers");
MapControlToGroup("BI_ChargeCannonballs", "BattleInterfaceControls");

As Nathan has explained in the controls tutorial this has the advantage that all controls can now be customized in the controls interface. But it seems that this group assignment restricts the function of the controls to certain parts of the game. E.g. the definition of of the F1 and F2 keys

CI_CreateAndSetControls( "General", "MainMenu", CI_GetKeyCode("VK_F1"), 0, false );
MapControlToGroup("MainMenu","Sailing3Pers");
MapControlToGroup("MainMenu","PrimaryLand");
MapControlToGroup("MainMenu","WorldMapControls");
MapControlToGroup("MainMenu","FightModeControls");
MapControlToGroup("MainMenu","BattleInterfaceControls");

has no entry for "Sailing1Pers", and therefore it didn't work in first person view at sea. Inserting this line

MapControlToGroup("MainMenu","Sailing1Pers");

fixes that.


Firedrill will be in another modpack, together with a bunch of other shiphandling tweaks. Nothing really new, they have already been posted. I estimate to have that ready in about 3 weeks (so it will probably become April <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" /> )
 
I have included a new controlsinit_PC.c file in the SWAK download that makes the fastequip and F1/F2 keys work always. At least it worked for me so far...
 
Back
Top