Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. class mcu8_SeqAct_MusicTreeVolumePitchMltp extends SequenceAction;
  2.  
  3. var float MultiplerVolume;
  4. var float MultiplerPitch;
  5.  
  6. defaultproperties
  7. {
  8. ObjName="Change MusicTree Volume/Pitch multiplers"
  9. ObjCategory="Sound"
  10.  
  11. InputLinks(0)=(LinkDesc="Change Volume Mult.")
  12. InputLinks(1)=(LinkDesc="Change Pitch Mult.")
  13. InputLinks(2)=(LinkDesc="Change Both Mult.")
  14.  
  15. MultiplerVolume = 0
  16. MultiplerPitch = 0
  17.  
  18. VariableLinks.Empty
  19. VariableLinks(1)=(ExpectedType=class'SeqVar_Float',LinkDesc="Volume multipler",bWriteable=true,PropertyName=MultiplerVolume)
  20. VariableLinks(2)=(ExpectedType=class'SeqVar_Float',LinkDesc="Pitch multipler",bWriteable=true,PropertyName=MultiplerPitch)
  21.  
  22. EventLinks.Empty
  23. bCallHandler=false
  24. }
  25.  
  26. event Activated()
  27. {
  28. local Hat_MusicManager mm;
  29.  
  30. local Hat_PlayerController pc;
  31.  
  32. pc = Hat_PlayerController(class'Engine'.static.GetEngine().GamePlayers[0].Actor);
  33.  
  34. if (pc == None) return;
  35.  
  36. mm = pc.GetMusicManager();
  37. if (mm == None) return;
  38. if (mm.MusicTreeInstance == None) return;
  39.  
  40. if (InputLinks[0].bHasImpulse || InputLinks[2].bHasImpulse)
  41. mm.MusicTreeInstance.VolumeMultiplier = MultiplerVolume;
  42.  
  43. if (InputLinks[1].bHasImpulse || InputLinks[2].bHasImpulse)
  44. mm.MusicTreeInstance.PitchMultiplier = MultiplerPitch;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement