AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   EV_INT_sequence - no repeat (https://forums.alliedmods.net/showthread.php?t=57988)

Fork 07-16-2007 10:48

EV_INT_sequence - no repeat
 
hi,

first my code:
Code:

register_forward(FM_PlayerPreThink, "ClientPreThink");

public ClientPreThink(Client)
{
    if (getClientATKCHARGE(Client) && isFX != 1)
    {
        server_print("FX on!");
        entity_set_int(Client, EV_INT_sequence, 110);
        isFX = 1;
    }
}

this works fine, but i still dont want that the sequence 110 repeats. i want to play him and then freeze him until i change them again. any ideas?

Vet 07-17-2007 00:45

Re: EV_INT_sequence - no repeat
 
I'm not sure I totally understand your question, but you can control the frame that's displayed in the sequence with EV_FL_frame. So just set the sequence, then control which frame is displayed.

Fork 07-17-2007 07:46

Re: EV_INT_sequence - no repeat
 
example:

i tell my model to do sequence 110. after this sequence is done, it repeats but i dont want repeat the sequence, i want play the sequence and after its finished i should not change it should just stay at the last frame.

Vet 07-17-2007 08:14

Re: EV_INT_sequence - no repeat
 
Then I think my post should work for you. Hook 'client_prethink', set the sequence, then advance the frames on each 'think' until it hits the last frame and loop there. You may have to fiddle with the 'framerate' and/or the amount you advance the frames since the model's framerate is probably different than the server's.

Wilson [29th ID] 07-17-2007 19:41

Re: EV_INT_sequence - no repeat
 
1 Attachment(s)
The attached file forces players to stop animating when they are standing still or crouched. I believe this will help you in your quest for self-actualisation.


All times are GMT -4. The time now is 21:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.