I've tried everything i can think of to do this...
I'm trying to make the animation on the rpg model from HL to KEEP animating even after the user has stopped pressing a button.
Here's what i've learned, tried, and know so far:
1. I know i have to use the function entity_set_int(id, EV_INT_weaponanim, <sequence>)
2. I know what the sequence numbers are and have some constants set up for them:
Code:
#define SEQ_IDLE 0
#define SEQ_FIDGET 1
#define SEQ_RELOAD 2
#define SEQ_FIRE 3
3. I've tried using entity_set_int in client_PreThink and it works only if the person continues to hold down the button, i've also tried a seperate function with the same results. I then tried a system of set_tasks and still had the same results.
4. if i do an if statement in client_PreThink like this:
Code:
if(mysequence = SEQ_RELOAD) {
entity_set_int(id, EV_INT_weaponanim, SEQ_RELOAD)
}
then it crashes before i can start a server.
what i need to know is:
1. where to place the entity_set_int function so that it will continue the animation after it has been called once or set in motion.
2. is there any other way to start a players weapon animation?
please reply soon and i'll put your name in the special thanks section of my plugin, which for reference can be found here:
http://forums.alliedmods.net/showthread.php?t=20745
__________________