Dog Animation LOOL

Posts 115 of 21 · Page 1 of 2
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" );
}
*sigh*

dog_init.gsc

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

Anyways, it's SP.
Is SP?
That some people were saying it was for multiplayer

Sorry for my english
Who said it's MP?
But yeah, it's SP.
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?
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.
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 ????
Quote Originally Posted by Black666Devil666 View Post
IS IT WORKING ????
...

How many times do I have to facepalm these days?
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
A simple answer: It doesnt work in MP.
Hmm is it possible to put the model in mp?
just try download ai zombie search for the botutil and change te Rmodel for the dog model
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 )
nope sorry your right its an anemation
lulz this is sp, i tested
Posts 115 of 21 · Page 1 of 2
This thread is closed for replies.

Tags for this Thread

None

Need help?