News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

The AI_FORWARD don't handled by custom script

Started by bitterman, March 13, 2018, 01:01:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bitterman

This is ai_player.script with some additions.

The string "sys.println( "^3 idle loop" );" does get control.
But looks like string "sys.println( "^3 ai_forward" );" does not.

void player::Torso_Idle() {

playCycle( ANIMCHANNEL_TORSO, "idle" );

eachFrame {

// added by me ************************

        sys.println( "^3 idle loop" );

if ( AI_FORWARD ) {
//                      animState( ANIMCHANNEL_TORSO, "Torso_Walk", 4 );
//                      Torso_Walk();
                        sys.println( "^3 ai_forward" );
}
// end of modification ************************

if ( AI_TELEPORT ) {
animState( ANIMCHANNEL_TORSO, "Torso_Teleport", 0 );
}
if ( AI_WEAPON_FIRED || weapon.WEAPON_START_FIRING ) {
animState( ANIMCHANNEL_TORSO, "Torso_Fire", 2 );
}
if ( AI_ATTACK_HELD && start_fire ) {
animState( ANIMCHANNEL_TORSO, "Torso_Fire_StartFire", 2 );
}
if ( AI_PAIN ) {
animState( ANIMCHANNEL_TORSO, "Torso_Pain", 0 );
}
}
}


Same native block on legs channel is works with AI_FORWARD fine.
I trying to acheive playng walk anim not only for legs but for torso too.

Why this is happens?

Thanks.

bitterman

Well, the lost anims in ai_player.script can generate an unexpected loops in "while (!animDone)" expression.

It can be checked via "listThreads" console command.

Done.

The Happy Friar

It is because of the main channels like you mentioned here: http://idtechforums.fuzzylogicinc.com/index.php?topic=632.msg6580#msg6580

Add more bones to channel and should work.