Página 1 de 1

Making a ped Animation

Enviado: 04 Ago 2018, 14:44
por Grinch_
ok here is my code.

Código: Selecionar tudo

SCRIPT_START
{
    NOP
    LVAR_INT sc_player sc_char
    GET_PLAYER_CHAR 0 sc_player 
    REQUEST_ANIMATION handsup
    REQUEST_ANIMATION sprint_panic
    LOAD_ALL_MODELS_NOW
    main:
    wait 0
    IF GET_CHAR_PLAYER_IS_TARGETING 0 sc_char
        TASK_PLAY_ANIM sc_char handsup ped 4.0 0 0 0 1 -1
        WHILE IS_PLAYER_TARGETTING_CHAR 0 sc_char
            wait 0
        ENDWHILE 
    ENDIF

    IF NOT IS_PLAYER_TARGETTING_CHAR 0 sc_char
        TASK_PLAY_ANIM sc_char handsup ped 4.0 0 0 0 0 1
        TASK_PLAY_ANIM sc_char sprint_panic ped 4.0 0 0 0 1 -1
    ENDIF 
    GOTO main
}
SCRIPT_END
After completing the first animation and going for the panic animation the peds seem to freeze and if i hit them again they seem to contiue the second animation.
What's the problem here?

Re: Making a ped Animation

Enviado: 04 Ago 2018, 14:48
por Snowflakes
Maybe you should use the TASK function between the animation commands

Re: Making a ped Animation

Enviado: 06 Ago 2018, 10:47
por Grinch_
Snowflakes escreveu:
04 Ago 2018, 14:48
Maybe you should use the TASK function between the animation commands
tried that,still the same.

Re: Making a ped Animation

Enviado: 25 Dez 2018, 13:28
por Saga
"REQUEST_ANIMATION" is for animation ".ifp" files, ped.ifp doesn't need this

Re: Making a ped Animation

Enviado: 25 Dez 2018, 14:46
por HybridTheory
why don't you use task sequences?

Re: Making a ped Animation

Enviado: 25 Dez 2018, 17:36
por Grinch_
HybridTheory escreveu:
25 Dez 2018, 14:46
why don't you use task sequences?
Thanks.I'll also try that.