Author Topic: Need help with a line of code.  (Read 901 times)

Basically I'm wondering how to make a line of code that plays the rocket fire sound effect when the right mouse button is clicked. It is for a playertype I am creating.
 

Code: [Select]
package thCIAAPackage
{
function serverCmdJet(%client)
{
    %player=%client.player;
    if(%player.getDatablock() $= "Your Player Datablock")
        serverPlay3D(blah);
}
};
activatePackage(thCIAAPackage);
Idk if serverPlay3D is the proper function name.

Code: [Select]
package thCIAAPackage
{
function serverCmdJet(%client)
{
    %player=%client.player;
    if(%player.getDatablock() $= "Your Player Datablock")
        serverPlay3D(blah);
}
};
activatePackage(thCIAAPackage);
Idk if serverPlay3D is the proper function name.

You should package and use the armor::onTrigger function instead of the above.

So I would put in the code and all I would change is "blah" for the sound I want played?

You should package and use the armor::onTrigger function instead of the above.
This would be better, however I forgot the arguments/specific triggers for the function.