Thread: Animations?

Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    is it only destructables.atr????

  2. #17
    eG Lobbies's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    29
    Reputation
    10
    Thanks
    3
    My Mood
    Bored
    It shows the animation of chickens cant you see?

  3. #18
    kuyakyloo's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Location
    in my house
    Posts
    59
    Reputation
    10
    Thanks
    6
    My Mood
    Sleepy
    I know it's supposed to show animations for chickens; I'm asking how to do this for players and bots.

  4. #19
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    Quote Originally Posted by kuyakyloo View Post
    I know it's supposed to show animations for chickens; I'm asking how to do this for players and bots.
    Players and chickens are both models, and weapon_oma_pack not, this last one is pro model

  5. #20
    darkorlegend's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Island Canary
    Posts
    171
    Reputation
    10
    Thanks
    62
    My Mood
    Worried
    I found this
    Pagine:
    http://www.*********.com/forums/topi...w2-pc-gsc-rip/

    #include common_scripts\utility;

    #using_animtree( "animated_props" );
    main()
    {
    level.init_animatedmodels_dump = false;

    if ( !isdefined( level.anim_prop_models ) )
    level.anim_prop_models = []; // this is what the LD puts in their map

    // Do special MP anim precaching
    model_keys = GetArrayKeys( level.anim_prop_models );
    foreach ( model_key in model_keys )
    {
    anim_keys = GetArrayKeys( level.anim_prop_models[model_key] );
    foreach ( anim_key in anim_keys )
    PrecacheMpAnim( level.anim_prop_models[model_key][anim_key] );
    //PrecacheMpAnim( level.anim_prop_models[ "foliage_tree_palm_bushy_1" ][ "strong" ] );
    }

    // wait until the end of the frame so that maps can init their trees
    // in their _anim instead of only above _load
    waittillframeend;

    level.init_animatedmodels = [];

    animated_models = getentarray( "animated_model", "targetname" );
    array_thread( animated_models, ::model_init );

    // one or more of the models initialized by model_init() was not setup by the map
    // so print this helpful note so the designer can see how to add it ot their level
    if ( level.init_animatedmodels_dump )
    assertmsg( "anims not cached for animated prop model, Repackage Zones and Rebuild Precache Script in Launcher:" );

    array_thread( animated_models, ::animateModel );

    level.init_animatedmodels = undefined;
    }

    model_init()
    {
    if ( !isdefined( level.anim_prop_models[ self.model ] ) )
    level.init_animatedmodels_dump = true;
    }

    // TODO: When we have multiple animations, instead of choosing randomly, do round-robin to get an even spread
    animateModel()
    {
    keys = GetArrayKeys( level.anim_prop_models[ self.model ] );
    animkey = keys[ RandomInt( keys.size ) ];

    //wait( RandomFloatRange( 0, 5 ) ); // TODO: get a way to play animations at random starting points
    self ScriptModelPlayAnim( level.anim_prop_models[ self.model ][ animkey ] );
    self willNeverChange();
    }
    Last edited by darkorlegend; 05-31-2011 at 03:57 PM.

Page 2 of 2 FirstFirst 12