Thread: Random Contacts
View Single Post
  #19  
Old 04-03-2010, 01:00 PM
Goblin Wizard Goblin Wizard is offline
Approved Member
 
Join Date: Oct 2008
Posts: 508
Default

Quote:
Originally Posted by Rastix View Post
It's not the same thing
the same as what?

Quote:
Originally Posted by tsavo View Post
wow!!!
in which file?
and what does position mean? is it only triggered by position?
you place "wav" file in the ..\Data\SOUND folder.
position is the source of the sound e.g.:
Quote:
PlaySound3D("horn3_2.wav", mothership:GetPosition(), 1);
will make horning mothership at max volume . You have to place it in the right function or create own trigger to activate it.

if you want to add this to trade station dialog you can search dockstation.script for function: "__TradeStationDock_Ok". This function is executed when you click "V" when asked for docking. Function should look like this:

Quote:
function __TradeStationDock_Ok()
local MothershipPilot = mothership:GetPilot();
local MothershipFlight = MothershipPilot:GetFlight();
MothershipFlight:Stop();
PlaySound3D("horn3_2.wav", mothership:GetPosition(), 1);
UpdateTradeSystem(FALSE);
TradeStationDlg(_param);
end;
As example I've added horn3_2.wav that exists in the sound folder

for "X" there is function:
Quote:
function __TradeStationDock_Cancel()
end;
between these two lines you can add another sound.
Reply With Quote