home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Messiah
/
data1.cab
/
Program_Executable_Files
/
messiahscripts
/
Sound
/
soundcode.hxx
< prev
next >
Wrap
Text File
|
1999-11-29
|
12KB
|
583 lines
//sample(name,position,volume,lifespan)
//position= absolute if not attached to an actor
//position= -1 if attached to an actor
//MISSING: Check which character. Play male/female/baby sound
//MISSING: The character sounds must also check if health is positive before playing sounds.
//MISSING: Perhaps it will be a good idea to have a routine to stop all charactersounds for a character before starting a death-scream.
subroutine(Sound_HitSmall)
{
if(VClass==_ClassAngel)
{
sample(SFXPainMale2,-1);
}
else
{
sample(SFXPainMale3,-1);
}
}
subroutine(Sound_Steamed)
{
//missing other classes
if(VClass==_ClassAngel)
{
sample(SFXBobUumph,-1);
}
else
{
sample(SFXMaleArrgh,-1);
}
}
subroutine(Sub_RandomWalkieKillSFX)
{
if(vrnd<25 && LastWalkieKillSFX!=1)
{
float(_set,LastWalkieKillSFX,1);
sample(SFXKillTargetWalkie0,-1);
}
elseif(vrnd<50 && LastWalkieKillSFX!=2)
{
float(_set,LastWalkieKillSFX,2);
sample(SFXKillTargetWalkie1,-1);
}
elseif(vrnd<75 LastWalkieKillSFX!=3)
{
float(_set,LastWalkieKillSFX,3);
sample(SFXKillTargetWalkie2,-1);
}
elseif(LastWalkieKillSFX!=4)
{
float(_set,LastWalkieKillSFX,4);
sample(SFXKillTargetWalkie3,-1);
}
else
{
float(_set,LastWalkieKillSFX,0);
sample(SFXKillTargetWalkie0,-1);
}
}
subroutine(Sub_RandomPunchedSFX)
{
//if(vframe==14 || vframe==11 || vframe==13)
if(vframe==1)
{
if(VAICon!=0)
{
sample(SFXPunchKickReact,-1);
}
else
{
sample(SFXShotReact,-1);
}
sample(SFXManPunch1,-1);
/* if(vrnd<25 && LastPunchedSFX!=1)
{
float(_set,LastPunchedSFX,1);
sample(SFXManPunch1,-1);
}
elseif(vrnd<50 && LastPunchedSFX!=2)
{
float(_set,LastPunchedSFX,2);
sample(SFXManPunch2,-1);
}
elseif(vrnd<75 LastPunchedSFX!=3)
{
float(_set,LastPunchedSFX,3);
sample(SFXManPunch3,-1);
}
elseif(LastPunchedSFX!=4)
{
float(_set,LastPunchedSFX,4);
sample(SFXManPunch4,-1);
}
else
{
float(_set,LastPunchedSFX,0);
sample(SFXManPunch1,-1);
}
*/
}
}
subroutine(Sub_EatMaleSFX)
{
if(VFrame==20)
{
Sample(SFXWorkerOhNo,-1);
}
elseif(vframe==100)
{
Sample(SFXWorkerScream,-1);
}
elseif(vframe==200)
{
Sample(SFXBehemothAngry,-1);
}
}
subroutine(Sub_RandomStrangledSFX)
{
if(vframe==41 || vframe==61)
{
sample(SFXManStrangled,-1);
}
}
subroutine(Sub_RandomWaterSFX)
{
if(vrnd<25 && LastWaterSFX!=1)
{
float(_set,LastWaterSFX,1);
sample(SFXFootStepWat1,-1);
}
elseif(vrnd<50 && LastWaterSFX!=2)
{
float(_set,LastWaterSFX,2);
sample(SFXFootStepWat2,-1);
}
elseif(vrnd<75 && LastWaterSFX!=3)
{
float(_set,LastWaterSFX,3);
sample(SFXFootStepWat3,-1);
}
elseif(LastWaterSFX!=4)
{
float(_set,LastWaterSFX,4);
sample(SFXFootStepWat4,-1);
}
else
{
float(_set,LastWaterSFX,0);
sample(SFXFootStepWat1,-1);
}
}
subroutine(Sub_BobRollSFX)
{
if (vframe==1)
{
sample(SFXBobClimb,-1);
}
}
subroutine(Sub_RandomKickRollSFX)
{
if(vframe==17)
{
if(vrnd<25 && LastPunchedSFX!=1)
{
float(_set,LastPunchedSFX,1);
sample(SFXManPunch1,-1);
}
elseif(vrnd<50 && LastPunchedSFX!=2)
{
float(_set,LastPunchedSFX,2);
sample(SFXManPunch2,-1);
}
elseif(vrnd<75 LastPunchedSFX!=3)
{
float(_set,LastPunchedSFX,3);
sample(SFXManPunch3,-1);
}
else
{
float(_set,LastPunchedSFX,4);
sample(SFXManPunch4,-1);
}
}
}
subroutine(Sub_RandomKickedSFX)
{
if(vframe==1)
{
if(VAICon!=0)
{
sample(SFXPunchKickReact,-1);
}
else
{
sample(SFXShotReact,-1);
}
sample(SFXManPunch1,-1);
/* if(vrnd<25 && LastPunchedSFX!=1)
{
float(_set,LastPunchedSFX,1);
sample(SFXManPunch1,-1);
}
elseif(vrnd<50 && LastPunchedSFX!=2)
{
float(_set,LastPunchedSFX,2);
sample(SFXManPunch2,-1);
}
elseif(vrnd<75 LastPunchedSFX!=3)
{
float(_set,LastPunchedSFX,3);
sample(SFXManPunch3,-1);
}
elseif(LastPunchedSFX!=4)
{
float(_set,LastPunchedSFX,4);
sample(SFXManPunch4,-1);
}
else
{
float(_set,LastPunchedSFX,0);
sample(SFXManPunch1,-1);
}
//------
if(vrnd<12 && LastKickedSFX!=1)
{
float(_set,LastKickedSFX,1);
sample(SFXManAgony1,-1);
}
elseif(vrnd<24 && LastKickedSFX!=2)
{
float(_set,LastKickedSFX,2);
sample(SFXManAgony2,-1);
}
elseif(vrnd<36 && LastKickedSFX!=3)
{
float(_set,LastKickedSFX,3);
sample(SFXManAgony3,-1);
}
elseif(vrnd<48 && LastKickedSFX!=4)
{
float(_set,LastKickedSFX,4);
sample(SFXManAgony4,-1);
}
elseif(vrnd<60 && LastKickedSFX!=5)
{
float(_set,LastKickedSFX,5);
sample(SFXManAgony5,-1);
}
elseif(vrnd<72 && LastKickedSFX!=6)
{
float(_set,LastKickedSFX,6);
sample(SFXManAgony6,-1);
}
elseif(vrnd<84 && LastKickedSFX!=7)
{
float(_set,LastKickedSFX,7);
sample(SFXManAgony7,-1);
}
elseif(LastKickedSFX!=8)
{
float(_set,LastKickedSFX,8);
sample(SFXManAgony8,-1);
}
else
{
sample(SFXManAgony2,-1);
float(_set,LastKickedSFX,0);
}
*/
}
}
subroutine(Sub_RandomHarpoonedSFX,const(volaroony))
{
if(vrnd<16 && LastHarpoonedSFX!=1)
{
float(_set,LastHarpoonedSFX,1);
sample(SFXManHarpooned1,-1,volaroony);
}
elseif(vrnd<32 && LastHarpoonedSFX!=2)
{
float(_set,LastHarpoonedSFX,2);
sample(SFXManHarpooned2,-1,volaroony);
}
elseif(vrnd<48 && LastHarpoonedSFX!=3)
{
float(_set,LastHarpoonedSFX,3);
sample(SFXManHarpooned3,-1,volaroony);
}
elseif(vrnd<64 && LastHarpoonedSFX!=4)
{
float(_set,LastHarpoonedSFX,4);
sample(SFXManHarpooned4,-1,volaroony);
}
elseif(vrnd<80 && LastHarpoonedSFX!=5)
{
float(_set,LastHarpoonedSFX,5);
sample(SFXManHarpooned5,-1,volaroony);
}
elseif(LastHarpoonedSFX!=6)
{
float(_set,LastHarpoonedSFX,6);
sample(SFXManHarpooned6,-1,volaroony);
}
else
{
float(_set,LastHarpoonedSFX,0);
sample(SFXManHarpooned2,-1,volaroony);
}
}
SubRoutine(Sub_CheckFootSteps,const(Foot))
{
if(vtrigger==_DIRwalking)
{
if(VClass==_ClassAngel)
{
float(_set,tmpfloat,90);
}
else
{
float(_set,tmpfloat,85);
}
}
else
{
if(VClass==_ClassAngel)
{
float(_set,tmpfloat,100);
}
else
{
float(_set,tmpfloat,95);
}
}
call(CheckFootCollision,Foot);
if(VSpecialFlag==_sFLAGFootCollide)
{
if(vrnd<25 && LastFootstep!=1)
{
float(_set,LastFootstep,1);
if(VClass==_ClassAngel)
{
sample(SFXFootStepBob1,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATstair)
{
sample(SFXFootStepBig1,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATWood)
{
sample(SFXFootStepWd1,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATMetal)
{
sample(SFXFootStepMet1,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATSheetMetal)
{
sample(SFXFootStepWlk1,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATConcrete)
{
sample(SFXFootStepCon1,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATWater)
{
sample(SFXFootStepWat1,-1,tmpfloat);
}
else
{
sample(SFXFootStepReg1,-1,tmpfloat);
}
}
elseif(vrnd<50 && LastFootstep!=2)
{
float(_set,LastFootstep,2);
if(VClass==_ClassAngel)
{
sample(SFXFootStepBob2,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATstair)
{
sample(SFXFootStepBig2,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATWood)
{
sample(SFXFootStepWd2,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATMetal)
{
sample(SFXFootStepMet2,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATSheetMetal)
{
sample(SFXFootStepWlk2,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATConcrete)
{
sample(SFXFootStepCon2,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATWater)
{
sample(SFXFootStepWat2,-1,tmpfloat);
}
else
{
sample(SFXFootStepReg2,-1,tmpfloat);
}
}
elseif(vrnd<75 && LastFootstep!=3)
{
float(_set,LastFootstep,3);
if(VClass==_ClassAngel)
{
sample(SFXFootStepBob3,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATstair)
{
sample(SFXFootStepBig3,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATWood)
{
sample(SFXFootStepWd3,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATMetal)
{
sample(SFXFootStepMet3,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATSheetMetal)
{
sample(SFXFootStepWlk3,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATConcrete)
{
sample(SFXFootStepCon3,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATWater)
{
sample(SFXFootStepWat3,-1,tmpfloat);
}
else
{
sample(SFXFootStepReg3,-1,tmpfloat);
}
}
elseif(LastFootstep!=4)
{
float(_set,LastFootstep,4);
if(VClass==_ClassAngel)
{
sample(SFXFootStepBob4,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATstair)
{
sample(SFXFootStepBig4,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATWood)
{
sample(SFXFootStepWd4,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATMetal)
{
sample(SFXFootStepMet4,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATSheetMetal)
{
sample(SFXFootStepWlk4,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATConcrete)
{
sample(SFXFootStepCon4,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATWater)
{
sample(SFXFootStepWat4,-1,tmpfloat);
}
else
{
sample(SFXFootStepReg4,-1,tmpfloat);
}
}
else
{
float(_set,LastFootstep,0);
if(VClass==_ClassAngel)
{
sample(SFXFootStepBob3,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATstair)
{
sample(SFXFootStepBig3,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATWood)
{
sample(SFXFootStepWd3,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATMetal)
{
sample(SFXFootStepMet3,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATSheetMetal)
{
sample(SFXFootStepWlk3,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATConcrete)
{
sample(SFXFootStepCon3,-1,tmpfloat);
}
elseif(VColMaterialProperties==_MATWater)
{
sample(SFXFootStepWat3,-1,tmpfloat);
}
else
{
sample(SFXFootStepReg3,-1,tmpfloat);
}
}
}
}
//TH added 9-99:
subroutine(Sub_SFXCop_BackgroundChatter)//plugged-in
{
if(VAIcon==1)//only do this for AI controlled characters
{
if(SoundDelayCounter<=0)//don't overlap sounds
{
float(_set,SoundDelayCounter,90);//set 3 second delay count-down until next sound can be triggered.
sample(SFXChat,-1);
}
}
}
subroutine(Sub_RandomCopScratchesCrotch)//plugged-in
{ //don't overlap sounds
//if(SoundDelayCounter<=0 && vframe==28)
//{
// float(_set,SoundDelayCounter,90);//set delay count-down until next sound can be triggered.
if(vframe==28)
{
sample(SFXCop_Scratch1,-1);
}
}