How to make an aim command?
Moderator: InsideQC Admins
50 posts
• Page 4 of 4 • 1, 2, 3, 4
Karall wrote:Well, i didn't understand jack of that.
But seriously, theplasticbing, make an animation where u pulled the gun to the center of the screen (like in medal of honor) and add a small zoom command.
-

behind_you - Posts: 237
- Joined: Sat Feb 05, 2011 6:57 am
- Location: Tripoli, Libya
I almost got it working now! Just one small problem, when I click my right mouse button (the one i bound impulse 123 to) nothing happens, ALTHO when i switch weapon and then switch back the the gun it goes into aim down sights mode. How do I fix it so that it plays the animation instantly?
Last edited by Karall on Sat Mar 05, 2011 5:13 pm, edited 1 time in total.
- Karall
- Posts: 128
- Joined: Thu Jul 15, 2010 5:23 pm
Oh, and also I actully have another problem. This might be more of a model problem though. The animation doesn't actully stay in aim down sights mode, it plays the two frames I made and then goes back to normal. How would I make it so that the animation stays at the last frame of my animation until i press impulse 123 again?
- Karall
- Posts: 128
- Joined: Thu Jul 15, 2010 5:23 pm
Karall wrote:Oh, and also I actully have another problem. This might be more of a model problem though. The animation doesn't actully stay in aim down sights mode, it plays the two frames I made and then goes back to normal. How would I make it so that the animation stays at the last frame of my animation until i press impulse 123 again?
- Code: Select all
void() weaponaim1 =[ $animation1, weaponaim2 ] {self.weaponframe = 0;};
void() weaponaim2 =[ $animation2, weaponaim2 ] {self.weaponframe = 1; self.aimmode = TRUE;};
//notice after $animation2, i said weaponaim2 again, which tells the engine to keep repeating the same frame. i also added a float that sets your aim mode to true
if (self.impulse == 123) //--put in weapons.qc, impulsecommands
if (self.aimmode == TRUE)
weaponunaim1();
else
weaponaim1();
void() weaponunaim1 =[ $unanimation1, weaponunaim2 ] {self.weaponframe = 2;};
void() weaponunaim2 =[ $unanimation2, weaponunaim2 ] {self.weaponframe = 3; self.aimmode = FALSE;};
oh and make sure you add .float aimmode; to the bottom of defs.qc
bon appetite!
-

behind_you - Posts: 237
- Joined: Sat Feb 05, 2011 6:57 am
- Location: Tripoli, Libya
50 posts
• Page 4 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 1 guest