Animate Gun When Shooting

Posted By: Silent_Assassin

Animate Gun When Shooting - 12/24/06 08:18

Hey,

just something simple and im sure im missing something... i want my gun to play an animation on left click (when shooting)...when i get a script that doesnt get any errors the animation doesnt work..otherwise i just get the error script error last line or something..anyone know how i can go about this ?

Nick
Posted By: DLively

Re: Animate Gun When Shooting - 12/25/06 03:13

use med to animate the modle, then make a script for your game either at the end of the function main, or, inside of the player script...

code:
________________________________________________________________________________

while(mouse_left == 1){wait(1);

ent_cycle("frame", my.skill50);
my.skill50 += 5 * time;
my.skill50 %= 100;

}

________________________________________________________________________________

frame is the name fo the frame your animating.

have fun, and good luck.

Link.
Posted By: Silent_Assassin

Re: Animate Gun When Shooting - 12/25/06 04:15

hmm that bit of code only gives me errors ^^

here is my code

Quote:


entity coltdelta_view
{
type = <coltdelta.mdl>;
layer = 2; // display above view entities with layer 1
flags = visible;// visible on screen from the start
view = CAMERA; // same camera parameters as the default view
x = 120; // place 100 quants ahead of the view
y = -50; // 30 to the left
z = -100; // and center vertically

while(mouse_left == 1){wait(1);

ent_cycle("firing5", my.skill50);
my.skill50 += 5 * time;
my.skill50 %= 100;
}
}





© 2024 lite-C Forums