Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    darkorlegend's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Island Canary
    Posts
    171
    Reputation
    10
    Thanks
    63
    My Mood
    Worried

    Dog Animation LOOL

    Dog animation in mp?
    #using_animtree( "dog" );

    main()
    {
    self useAnimTree( #animtree );

    initDogAnimations();
    animscripts\init::firstInit();

    self.ignoreSuppression = true;
    self.newEnemyReactionDistSq = 0;

    self.chatInitialized = false;
    self.noDodgeMove = true;
    self****ot_anim = %root;

    self.meleeAttackDist = 0;
    self thread setMeleeAttackDist();

    self.a = spawnStruct();
    self.a.pose = "stand"; // to use DoNoteTracks()
    self.a.nextStandingHitDying = false; // to allow dogs to use bullet shield
    self.a.movement = "run";

    animscripts\init::set_anim_playback_rate();

    self.suppressionThreshold = 1;
    self.disableArrivals = false;
    self.stopAnimDistSq = anim.dogStoppingDistSq;
    self.useChokePoints = false;
    self.turnRate = 0.2;

    self thread animscripts\combat_utility::monitorFlash();

    self.pathEnemyFightDist = 512;
    self setTalkToSpecies( "dog" );

    self.health = int( anim.dog_health * self.health );
    }


    setMeleeAttackDist()
    {
    self endon( "death" );

    while ( 1 )
    {
    if ( isdefined( self.enemy ) && isplayer( self.enemy ) )
    self.meleeAttackDist = anim.dogAttackPlayerDist;
    else
    self.meleeAttackDist = anim.dogAttackAIDist;

    self waittill( "enemy" );
    }
    }


    initDogAnimations()
    {
    if ( !isdefined( level.dogsInitialized ) )
    {
    level.dogsInitialized = true;
    // [{+melee}] Melee the dog right when it bites to grab its throat.
    precachestring( &"SCRIPT_PLATFORM_DOG_DEATH_DO_NOTHING" );
    // [{+melee}] Melee the dog before it bites to grab its throat.
    precachestring( &"SCRIPT_PLATFORM_DOG_DEATH_TOO_LATE" );
    // [{+melee}] Wait for the dog to bite to grab its throat.
    precachestring( &"SCRIPT_PLATFORM_DOG_DEATH_TOO_SOON" );
    // [{+melee}]
    precachestring( &"SCRIPT_PLATFORM_DOG_HINT" );

    // Watch for the ^3[{+melee}]^7 hint to grab a dog.
    precachestring( &"NEW_DOG_DEATH_DO_NOTHING_ALT" );
    // Too late. Watch for the ^3[{+melee}]^7 hint to grab a dog.
    precachestring( &"NEW_DOG_DEATH_TOO_LATE_ALT" );
    // Too early. Wait for the ^3[{+melee}]^7 hint to grab a dog.
    precachestring( &"NEW_DOG_DEATH_TOO_SOON_ALT" );
    }

    // Initialization that should happen once per level
    if ( isDefined( anim.NotFirstTimeDogs ) )// Use this to trigger the first init
    return;
    precacheShader( "hud_dog_melee" );
    anim.NotFirstTimeDogs = 1;
    anim.dogStoppingDistSq = lengthSquared( getmovedelta( %german_shepherd_run_stop, 0, 1 ) * 1.2 ) ;
    anim.dogStartMoveDist = length( getmovedelta( %german_shepherd_run_start, 0, 1 ) );

    // notetime = getNotetrackTimes( %german_shepherd_attack_player, "dog_melee" );
    // anim.dogAttackPlayerDist = length( getmovedelta( %german_shepherd_attack_player, 0, notetime[ 0 ] ) );
    anim.dogAttackPlayerDist = 102;// hard code for now, above is not accurate.

    offset = getstartorigin( ( 0, 0, 0 ), ( 0, 0, 0 ), %german_shepherd_attack_AI_01_start_a );
    anim.dogAttackAIDist = length( offset );

    anim.dogTraverseAnims = [];
    anim.dogTraverseAnims[ "wallhop" ] = %german_shepherd_run_jump_40;
    anim.dogTraverseAnims[ "window_40" ] = %german_shepherd_run_jump_window_40;
    anim.dogTraverseAnims[ "jump_down_40" ] = %german_shepherd_traverse_down_40;
    anim.dogTraverseAnims[ "jump_up_40" ] = %german_shepherd_traverse_up_40;
    anim.dogTraverseAnims[ "jump_up_80" ] = %german_shepherd_traverse_up_80;

    // Dog start move animations
    // number indexes correspond to keyboard number directions
    anim.dogStartMoveAngles[ 8 ] = 0;
    anim.dogStartMoveAngles[ 6 ] = 90;
    anim.dogStartMoveAngles[ 4 ] = -90;
    anim.dogStartMoveAngles[ 3 ] = 180;
    anim.dogStartMoveAngles[ 1 ] = -180;

    anim.dogStartMoveAnim[8] = %german_shepherd_run_start;
    anim.dogStartMoveAnim[6] = %german_shepherd_run_start_L;
    anim.dogStartMoveAnim[4] = %german_shepherd_run_start_R;
    anim.dogStartMoveAnim[3] = %german_shepherd_run_start_180_L;
    anim.dogStartMoveAnim[1] = %german_shepherd_run_start_180_R;

    anim.dogLookPose[ "attackIdle" ][ 2 ] = %german_shepherd_attack_look_down;
    anim.dogLookPose[ "attackIdle" ][ 4 ] = %german_shepherd_attack_look_left;
    anim.dogLookPose[ "attackIdle" ][ 6 ] = %german_shepherd_attack_look_right;
    anim.dogLookPose[ "attackIdle" ][ 8 ] = %german_shepherd_attack_look_up;

    anim.dogLookPose[ "normal" ][ 2 ] = %german_shepherd_look_down;
    anim.dogLookPose[ "normal" ][ 4 ] = %german_shepherd_look_left;
    anim.dogLookPose[ "normal" ][ 6 ] = %german_shepherd_look_right;
    anim.dogLookPose[ "normal" ][ 8 ] = %german_shepherd_look_up;

    // effects used by dog
    level._effect[ "dog_bite_blood" ] = loadfx( "impacts/deathfx_dogbite" );
    level._effect[ "deathfx_bloodpool" ] = loadfx( "impacts/deathfx_bloodpool_view" );

    // setup random timings for dogs attacking the player
    slices = 5;
    array = [];
    for ( i = 0; i <= slices; i++ )
    {
    array[ array.size ] = i / slices;
    }
    level.dog_melee_index = 0;
    level.dog_melee_timing_array = maps\_utility::array_randomize( array );

    setdvar( "friendlySaveFromDog", "0" );
    }

  2. #2
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    158
    *sigh*

    dog_init.gsc

    May I ask, how you got the conclussion that it's MP...? >_>

    Anyways, it's SP.

  3. #3
    darkorlegend's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Island Canary
    Posts
    171
    Reputation
    10
    Thanks
    63
    My Mood
    Worried
    Is SP?
    That some people were saying it was for multiplayer

    Sorry for my english

  4. #4
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    158
    Who said it's MP?
    But yeah, it's SP.

  5. #5
    Black666Devil666's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    1
    My Mood
    Yeehaw
    of course it is sp ^^ u never player the sp ?? hmmm .. i think so .. because u asked: "if this is really sp?" .... but what is with this code, is it working on mods?
    Last edited by Black666Devil666; 06-01-2011 at 10:26 AM.

  6. #6
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by Black666Devil666 View Post
    of course it is sp ^^ u never player the sp ?? hmmm .. i think so .. because u as if this is really sp .... but what is with this code is it working on mods?
    Your english here.....

    Makes no sense for me.
    You say that:
    How can I make this work for multiplayer? (GSC Modding)

    Well, many SP files is also used in MP.
    And the other way.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  7. #7
    Black666Devil666's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    1
    My Mood
    Yeehaw
    Quote Originally Posted by jorndel View Post
    Your english here.....

    Makes no sense for me.
    You say that:
    How can I make this work for multiplayer? (GSC Modding)

    Well, many SP files is also used in MP.
    And the other way.
    IS IT WORKING ????

  8. #8
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    158
    Quote Originally Posted by Black666Devil666 View Post
    IS IT WORKING ????
    ...

    How many times do I have to facepalm these days?

  9. #9
    Black666Devil666's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    1
    My Mood
    Yeehaw
    Quote Originally Posted by EpicPlayer View Post
    ...

    How many times do I have to facepalm these days?
    so if im wrong on this page tell it to me pls

  10. #10
    edub18's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Germany
    Posts
    146
    Reputation
    10
    Thanks
    12
    My Mood
    Bored
    A simple answer: It doesnt work in MP.

  11. The Following User Says Thank You to edub18 For This Useful Post:

    Black666Devil666 (06-08-2011)

  12. #11
    TechnoX's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    Logitech G510.
    Posts
    154
    Reputation
    11
    Thanks
    3
    My Mood
    Yeehaw
    Hmm is it possible to put the model in mp?

  13. #12
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    just try download ai zombie search for the botutil and change te Rmodel for the dog model

  14. #13
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by pyrozombie View Post
    just try download ai zombie search for the botutil and change te Rmodel for the dog model
    Well, as you maybe see...
    There is no model here.. (Or am I blind?)

    So he won't be able to try that out.

    Anyway...

    This is how the dogs work and how you interface with them.
    So now, this would not work.....
    (Was the word Interface the right word to use here? Bad English u know )

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  15. #14
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    nope sorry your right its an anemation

  16. #15
    YuDi21's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    mp_complex
    Posts
    141
    Reputation
    12
    Thanks
    35
    My Mood
    Angelic
    lulz this is sp, i tested

Page 1 of 2 12 LastLast