Author Topic: Knowing I should know this  (Read 321 times)

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Knowing I should know this
« on: January 13, 2013, 09:36:14 pm »


                <dribbling ink...>

Ok, temporarily stumped.
I want to dismount my familiar VFX when the familiar enters combat. No problem, put it in the X2_SPECIAL_COMBAT_AI_SCRIPT.

But I want to *mount* the familiar VFX when the player tells it to "Follow Me", either through the radial or in convo.
How can I catch that event without checking the GetLastAssociateCommand on a heartbeat?

Failing that, what else would be a good event to hook to put the familiar on the master's shoulder?

<...as he hesitates>
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Knowing I should know this
« Reply #1 on: January 13, 2013, 09:49:48 pm »


               The voice commands are addressed in the associate's OnConversation event: NW_CH_AC4

The specific function is in x0_inc_henai
and called
bkRespondToHenchmenShout
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Knowing I should know this
« Reply #2 on: January 13, 2013, 09:53:20 pm »


               <taking a deep breath...>

TYVM :-)

<...and diving back in>
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Knowing I should know this
« Reply #3 on: January 13, 2013, 10:39:59 pm »


               <too tired...>

Adding


            if ((nMatch == ASSOCIATE_COMMAND_FOLLOWMASTER) &&  (ASSOCIATE_TYPE_FAMILIAR == GetAssociateType( OBJECT_SELF )) )
            {
               // Mount familiar
               MountFamiliarVFX(oMaster);
            }

...just before bkRespondToHenchmanShout causes a cascading "default value does not match the initializer" starting with "nHDiff" in x0_i0_anims... How? I don't declare nHDiff anywhere. Nor "nValue".

What happened?

<...to track down gremlins>
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Knowing I should know this
« Reply #4 on: January 13, 2013, 10:49:40 pm »


               Look more carefully at the errors you get in that cascade. The improved compiler often catches insignificant errors in the standard includes like x0_i0_anims