OK. I decided to clean up my workflow a bit and moved my sound files to a uax file, my meshes to a usx file, and so forth. I learned that I would need to use EXEC OBJ LOAD lines to load the files during compile so UCC could find the resources stored within. However, the following code doesn't compile. UCC says it still can't find Sound 'ELMS2K3_Sounds.EvilLaugh' . Am I missing something?
Code:
//Load the sounds file, so it can find EvilLaugh.
#exec OBJ LOAD FILE=..\Sounds\ELMS2K3_Sounds.uax
class ELMS2K3_CoinPouch extends Inventory;
var int CoinCount;
var float CoinLimit;
function AddCoin()
{
local sound EvilLaugh;
EvilLaugh = Sound'ELMS2K3_Sounds.ELMS.EvilLaugh';
// Add one coin
CoinCount++;
log("Player has " $ CoinCount $ " coins.");
if (CoinCount >= CoinLimit)
// Player has enough coins to buy a life
{
// Subtract the number of coins to buy a life
CoinCount = CoinCount - CoinLimit;
// Add one life to the player
xpawn(owner).PlayerReplicationInfo.Deaths = xpawn(owner).PlayerReplicationInfo.Deaths - 1;
// Tell everyone about it. <evil grin>
xpawn(owner).PlaySound(EvilLaugh);
xpawn(owner).ClientMessage ("You have gained an extra life!");
}
}