Welcome, Guest. Please login or register. Did you miss your activation email?

* TUTORIAL SECTION RULES

This section is for SMOD TUTORIALS & GUIDES ONLY.
You may create a new topic in the appropriate area to share your tutorial. If you post anything off-topic here you will be temp-banned. This is so we don't hassle the moderators too much, they are volunteers.

If you need help with a tutorial, post a reply in its thread . Do not start a new topic for help here!

Author Topic: [Tutorial] Realtime scopes  (Read 15153 times)

0 Members and 1 Guest are viewing this topic.

Offline Vedad1944

  • *
  • +2% chance to make useful post
  • Vedad1944 has no influence.
Re: [Tutorial] Realtime scopes
« Reply #45 on: April 04, 2015, 10:44:03 PM »
the gun had animation but it was turned to side
Then just look for this, here's an example of one of my .qc-s:
Code: [Select]
$sequence reload "reload" ACT_VM_RELOAD 1 fps 34.00 {
  { event 5004 1 "MP5.Cloth" }
  { event 5004 12 "MP5.boltpull" }
  { event 5004 38 "MP5.clipout" }
  { event 5004 64 "MP5.clipin" }
  { event 5004 84 "MP5.boltslap" }
}
Add snap rotate -90 before the "fps" part:
Code: [Select]
$sequence reload "reload" ACT_VM_RELOAD 1 snap rotate -90 fps 34.00 {
  { event 5004 1 "MP5.Cloth" }
  { event 5004 12 "MP5.boltpull" }
  { event 5004 38 "MP5.clipout" }
  { event 5004 64 "MP5.clipin" }
  { event 5004 84 "MP5.boltslap" }
}
That way you fix the rotation of the viewmodel.
Also you need to do this for every animation, so if you see your weapon snap sideways after a certain anim, that animation hasn't got snap rotate on it.
The other thing is that if anything is compiled on Source 2007 you wont be able to decompile it without messing up either the reference model OR the reload animation (if its a viewmodel). Easy way to check is to just decompile and then import the reload sequence into a model editor/animator and playing the animation.