Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class mcu8_SeqAct_MusicTreeVolumePitchMltp extends SequenceAction;
- var float MultiplerVolume;
- var float MultiplerPitch;
- defaultproperties
- {
- ObjName="Change MusicTree Volume/Pitch multiplers"
- ObjCategory="Sound"
- InputLinks(0)=(LinkDesc="Change Volume Mult.")
- InputLinks(1)=(LinkDesc="Change Pitch Mult.")
- InputLinks(2)=(LinkDesc="Change Both Mult.")
- MultiplerVolume = 0
- MultiplerPitch = 0
- VariableLinks.Empty
- VariableLinks(1)=(ExpectedType=class'SeqVar_Float',LinkDesc="Volume multipler",bWriteable=true,PropertyName=MultiplerVolume)
- VariableLinks(2)=(ExpectedType=class'SeqVar_Float',LinkDesc="Pitch multipler",bWriteable=true,PropertyName=MultiplerPitch)
- EventLinks.Empty
- bCallHandler=false
- }
- event Activated()
- {
- local Hat_MusicManager mm;
- local Hat_PlayerController pc;
- pc = Hat_PlayerController(class'Engine'.static.GetEngine().GamePlayers[0].Actor);
- if (pc == None) return;
- mm = pc.GetMusicManager();
- if (mm == None) return;
- if (mm.MusicTreeInstance == None) return;
- if (InputLinks[0].bHasImpulse || InputLinks[2].bHasImpulse)
- mm.MusicTreeInstance.VolumeMultiplier = MultiplerVolume;
- if (InputLinks[1].bHasImpulse || InputLinks[2].bHasImpulse)
- mm.MusicTreeInstance.PitchMultiplier = MultiplerPitch;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement