Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. // on BerimbauClientMode
  2. // ===============================
  3.  
  4. // first time initializing your array of models (cbaseanimatingoverlay, or whatever)
  5. Initialize(){
  6. for all character models
  7. set model()
  8. useclientsideanimation()
  9. }
  10.  
  11. // looped
  12. UpdateCharacterModels(){
  13. for all character models
  14. model->frameadvance
  15. }
  16.  
  17. // on CharacterMenu
  18. // ===============================
  19.  
  20. // have a pointer record which one you have selected
  21. CBaseAnimatingOverlay *pSelectedCharacter;
  22.  
  23. // on click
  24. OnClick(){
  25. // figure out which character the player is attempting to select
  26. CBaseAnimatingOverlay *pNewSelected = // however you actually get it
  27.  
  28. // if we have one already selected
  29. if( pSelectedCharacter != null )
  30. {
  31. // find the idle animation for this character
  32. idleanimation = character GetData( idle animation key )
  33.  
  34. // set the animation
  35. pSelectedCharacter-> ResetSequence( idleanimation )
  36. }
  37.  
  38. pSelectedCharacter = pNewSelected;
  39.  
  40. // find the active animation for this character
  41. activeanimation = character GetData( active animation key )
  42. pSelectedCharacter->ResetSequence( activeanimation )
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement