AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Forcing sequence in a player (https://forums.alliedmods.net/showthread.php?t=109517)

frk_14 11-18-2009 03:09

Forcing sequence in a player
 
Is possible possible obligate a player run X sequence?, for example, when jump, the upper body use aim_... or shot_... .I want that when jump, use jump animation, too (the upper body)

means?

ConnorMcLeod 11-18-2009 15:27

Re: Forcing sequence in a player
 
Look at matrix jump plugin (in new submission i think).

frk_14 11-18-2009 16:07

Re: Forcing sequence in a player
 
thanks

joropito 11-18-2009 16:24

Re: Forcing sequence in a player
 
Quote:

Originally Posted by ConnorMcLeod (Post 992927)
Look at matrix jump plugin (in new submission i think).

I tried that with frk but some things doesn't work.

The problem is not with the sequence. It's with the frames.

The animation doesn't start, but if a spawn a new entity with the same model, force the sequence and then play it everything works.

What frk needs is to make a player sequence and gaimsequence work at the same time for the same movement (walk)


EDIT:

Nevermind, frk say me that the first model hasn't a gaimsequence and now yes.

frk_14 11-18-2009 20:57

Re: Forcing sequence in a player
 
I have other problem, the animations work only in the air, but no in the floor
Im testing with this two plugins
Code:

#include <amxmodx>
#include <fakemeta>

public  plugin_init()
{
register_plugin("Frk", "Mejor",  "Modeler")
register_forward(FM_PlayerPreThink, "PreThink")
}

public  PreThink(id)
{
if (pev(id, pev_sequence) !=8 )
{
set_pev(id,  pev_sequence,        8)
set_pev(id, pev_gaitsequence,    8)
set_pev(id,  pev_frame,        30.0)
set_pev(id, pev_fuser1,        10.0)
set_pev(id,  pev_animtime,  3.0)
set_pev(id, pev_framerate,    10.0)
}
}

Code:

#include <amxmodx>

#include <engine>

#include <fakemeta>


public plugin_init()
{
    register_plugin("dd", "1.0", "?");
   
    register_forward(FM_PlayerPreThink, "PlayerPreThink");
}

public PlayerPreThink(id)
{
    static button;
    button = pev(id, pev_button);

    if (button & IN_RUN)
        entity_set_int(id, EV_INT_sequence, 4)
   
    set_pev(id, pev_button, button);
    return FMRES_HANDLED;
}



All times are GMT -4. The time now is 13:40.

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